/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * com_distri_compras_proveedores_edita.java
 *
 * Created on 1/09/2011, 11:03:01 AM
 */

package sie_invdis;


import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;

import java.text.ParseException;
import java.text.*;


import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.ui.RefineryUtilities;
/**
 *
 * @author Michelle
 */
public class com_distri_compras_proveedores_edita extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo;
    private javax.swing.table.DefaultTableModel jtable_modelo_distribucion;
    private javax.swing.table.DefaultTableModel jtable_modelo_resumen;
    private javax.swing.table.DefaultTableModel jtable_modelo_articyestadis;
    private javax.swing.table.DefaultTableModel jtable_modelo_invextie;
    private javax.swing.table.DefaultTableModel jtable_modelo_amv;
    private javax.swing.table.DefaultTableModel jtable_modelo_artialma;
    private javax.swing.table.DefaultTableModel jtable_modelo_comprasxmes;
    private javax.swing.table.DefaultTableModel jtable_modelo_existencias;
    private javax.swing.table.DefaultTableModel jtable_modelo_comxfam_detpro_artis;


     private javax.swing.table.DefaultTableModel jtable_modelo_estadisticas;

    private  JTable jtable_tiendas=variables_global.gettabla_tiendas();

    bd_conexion x = new bd_conexion();
    ResultSet rs = null;
    int columnavisualisa=2,columnavisualisa1=1,columnaanterior=0,columnavisualisarot=5,columnaanteriorrot=0,yacarguecomxmes=0,controltiendas=0,opcioncons=1;

    int fempleadoactual=0, fpreguntaactual=0,fpuestoactual=0,findicadoractual,opcioncatalogo=0,controlcomboasi=0,indexactual=1,yacarguehistorial=0,yacarguedistrialma=0,yacargueestaventa=0,controlcombo=0,yacarguerotarti=0,yacarguecostoinve=0,yacargueartmasven=0,yacargueminmax=0;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
    String textobuscaemplea="",esquesele="";

    /** Creates new form com_distri_compras_proveedores_edita */
    public com_distri_compras_proveedores_edita() {
        initComponents();
    }
public com_distri_compras_proveedores_edita(String idproveedor) {
    this.iniciar_modelo_de_tabla();
    this.iniciar_modelo_distribucionalma();
    this.iniciar_modelo_resumenreporte();
    this.iniciar_modelo_artiyesta();
    this.iniciar_modelo_invxtie();
    this.iniciar_modelo_articulsmasven();
    this.iniciar_modelo_artialma();
    this.iniciar_modelo_comprasxmes();
    this.iniciar_modelo_artiexistencias();
    this.iniciar_modelo_articuloestadistica();
    this.iniciar_modelo_comprasxfam_detxprov_arti();
        initComponents();

        jtb_comprascatalogo.getColumnModel().getColumn(0).setPreferredWidth(60);//Status
        jtb_comprascatalogo.getColumnModel().getColumn(1).setPreferredWidth(20);//Folio
        jtb_comprascatalogo.getColumnModel().getColumn(2).setPreferredWidth(35);//doc referencia
        jtb_comprascatalogo.getColumnModel().getColumn(3).setPreferredWidth(35);//fecha docto
        jtb_comprascatalogo.getColumnModel().getColumn(4).setPreferredWidth(35);//fecha llega almacen
        jtb_comprascatalogo.getColumnModel().getColumn(5).setPreferredWidth(35);//f.recepcion
        jtb_comprascatalogo.getColumnModel().getColumn(6).setPreferredWidth(35);//dias trans
        jtb_comprascatalogo.getColumnModel().getColumn(7).setPreferredWidth(60);//viaje
        jtb_comprascatalogo.getColumnModel().getColumn(8).setPreferredWidth(160);//proveedor
        jtb_comprascatalogo.getColumnModel().getColumn(9).setPreferredWidth(35);//piezas
        jtb_comprascatalogo.getColumnModel().getColumn(10).setPreferredWidth(35);//costo
        jtb_comprascatalogo.getColumnModel().getColumn(11).setPreferredWidth(35);//precio
        jtb_comprascatalogo.getColumnModel().getColumn(12).setPreferredWidth(120);//observaciones

        this.carga_datos_proveedor(1, idproveedor);
        
        this.buttonGroup1.setSelected(jrbtn_columnaclave.getModel(), true);
        this.buttonGroup2.setSelected(jRadioButtonrot.getModel(), true);
        this.buttonGroup3.setSelected(jrbn_repguar.getModel(), true);


         jt_articulosestadisticas.getTableHeader().setPreferredSize(new Dimension(jt_articulosestadisticas.getTableHeader().getWidth(),35));
         jt_articulosestadisticas.getTableHeader().setBackground(Color.yellow);

         jt_articulosestadisticas.getColumnModel().getColumn(0).setPreferredWidth(10);//tem ent
         jt_articulosestadisticas.getColumnModel().getColumn(1).setPreferredWidth(10);//tem venta
         jt_articulosestadisticas.getColumnModel().getColumn(2).setPreferredWidth(60);//familia
         jt_articulosestadisticas.getColumnModel().getColumn(3).setPreferredWidth(10);//id
         jt_articulosestadisticas.getColumnModel().getColumn(4).setPreferredWidth(55);//clave
         jt_articulosestadisticas.getColumnModel().getColumn(5).setPreferredWidth(120);//descrip.
         jt_articulosestadisticas.getColumnModel().getColumn(6).setPreferredWidth(55);//item
         jt_articulosestadisticas.getColumnModel().getColumn(7).setPreferredWidth(35);//linea
         jt_articulosestadisticas.getColumnModel().getColumn(8).setPreferredWidth(10);//costo
         jt_articulosestadisticas.getColumnModel().getColumn(9).setPreferredWidth(10);//precio
         jt_articulosestadisticas.getColumnModel().getColumn(10).setPreferredWidth(35);//f.ult. compra
         jt_articulosestadisticas.getColumnModel().getColumn(11).setPreferredWidth(10);//p vendida
         jt_articulosestadisticas.getColumnModel().getColumn(12).setPreferredWidth(10);//exixtencia
         jt_articulosestadisticas.getColumnModel().getColumn(13).setPreferredWidth(15);//rotacion

         jt_articulosestadisticas.getTableHeader().setBackground(Color.yellow);
         controlcombo=1;
         this.setTitle("S.I. Proveedores (Edicion:"+this.jtf_provnombre.getText()+")");
         this.loadcom_status();
         this.loadcom_clasif();
         this.loadcom_ctacontrol();
         this.loadcombo();
          this.loadcombo2();
    }
private void iniciar_modelo_de_tabla()
    {
        jtable_modelo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo.addColumn("<html><b>Status</b></html>");
        jtable_modelo.addColumn("<html><b>Folio</b></html>");
        jtable_modelo.addColumn("<html><b>Doc. Ref.</b></html>");
        jtable_modelo.addColumn("<html><b>F.llega alm</b></html>");
        jtable_modelo.addColumn("<html><b>F.Ref</b></html>");
        jtable_modelo.addColumn("<html><b>F.Recepcion</b></html>");
        jtable_modelo.addColumn("<html><b>Dias Trans.</b></html>");
        jtable_modelo.addColumn("<html><b>Viaje</b></html>");
        jtable_modelo.addColumn("<html><b>Proveedor</b></html>");
        jtable_modelo.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo.addColumn("<html><b>Costo</b></html>");
        jtable_modelo.addColumn("<html><b>Precio Venta</b></html>");
        jtable_modelo.addColumn("<html><b>Observaciones</b></html>");
   }
private void iniciar_modelo_distribucionalma()
    {
        jtable_modelo_distribucion=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_distribucion.addColumn("F.Dist.");
        jtable_modelo_distribucion.addColumn("Fecha");
        jtable_modelo_distribucion.addColumn("Codigo");
        jtable_modelo_distribucion.addColumn("Item");
        jtable_modelo_distribucion.addColumn("Costo");
        jtable_modelo_distribucion.addColumn("P.Michelle");
        try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_distribucion_clientesv2() as (id smallint,idcleinte character varying(12),ordenvisua smallint,clientenombre character varying(60),ordenvisualtienda smallint);",variables_global.getconexiongral());
               while (rs.next())
                    {
                          jtable_modelo_distribucion.addColumn("<html><b>"+rs.getString("idcleinte")+":"+rs.getString("clientenombre")+"</b></html>");
                    }
            }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
        jtable_modelo_distribucion.addColumn("Total");
    }
private void iniciar_modelo_resumenreporte()
    {
        int numerotiendas=this.jtable_tiendas.getRowCount(),ii=0,idtienda=0,ndias=0;
        jtable_modelo_resumen=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_resumen.addColumn("Mes/Tienda");
        for(int i=0;i<numerotiendas;i++)
           {
                 jtable_modelo_resumen.addColumn("<html><b>"+this.jtable_tiendas.getValueAt(i,1).toString()+":"+this.jtable_tiendas.getValueAt(i,0).toString()+"</b></html>");
           }
        jtable_modelo_resumen.addColumn("Totales");

        int numerocolumnas=this.jtable_modelo_resumen.getColumnCount();
        Object[] fnewRow = new Object[numerocolumnas];
        fnewRow[0]="<html><h3><b>Piezas: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_resumen.addRow(fnewRow);

        fnewRow[0]="<html><h3><b>Precio: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_resumen.addRow(fnewRow);
        fnewRow[0]="<html><h3><b>Costo: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_resumen.addRow(fnewRow);

        fnewRow[0]="<html><h3><b>Utilidad: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_resumen.addRow(fnewRow);

        fnewRow[0]="<html><h3><b>%: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_resumen.addRow(fnewRow);

        fnewRow[0]="<html><h3><b>Costo Actual Inve.: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_resumen.addRow(fnewRow);

    }
private void iniciar_modelo_artiyesta()
    {
        jtable_modelo_articyestadis=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_articyestadis.addColumn("<html><b>Temp. Ent.</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Temp. Venta</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Familia</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Id</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Descripcion.</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Item.</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Linea.</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Precio</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>F.Compra</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>P.Vendidas</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Exist.</b></html>");
        jtable_modelo_articyestadis.addColumn("<html><b>Rot.</b></html>");
  

   }
private void iniciar_modelo_articuloestadistica()
 {
        jtable_modelo_estadisticas=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>Tienda</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>C.Surt</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>Pzas E.</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>F.u.Compra</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>P.Vend</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>f.P.Venta</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>f.U.Venta</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>E.Min</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>E.max</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>Exist.</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>F.a.Traspaso</b></BODY></html>");
        jtable_modelo_estadisticas.addColumn("<html><BODY><b>F.a.Promocion</b></BODY></html>");

}

private void iniciar_modelo_invxtie()
    {


        int numerotiendas=this.jtable_tiendas.getRowCount(),ii=0,idtienda=0,ndias=0;

        jtable_modelo_invextie=new javax.swing.table.DefaultTableModel();//Creo el modelo
         jtable_modelo_invextie.addColumn("Concepto");
        for(int i=0;i<numerotiendas;i++)
           {
                  jtable_modelo_invextie.addColumn("<html><b>"+this.jtable_tiendas.getValueAt(i,1).toString()+":"+this.jtable_tiendas.getValueAt(i,0).toString()+"</b></html>");
           }
         jtable_modelo_invextie.addColumn("D:Almacen");
         jtable_modelo_invextie.addColumn("Total");


        int numerocolumnas=this.jtable_modelo_invextie.getColumnCount();
        Object[] fnewRow = new Object[numerocolumnas];
        fnewRow[0]="<html><h3><b>Piezas: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_invextie.addRow(fnewRow);
        fnewRow[0]="<html><h3><b>Costo: "+"</b></h3></html>";
            for( ii=1;ii<numerocolumnas;ii++)
                {
                    fnewRow[ii]="0";
                }
        jtable_modelo_invextie.addRow(fnewRow);
     

       //para formatear
       //fnewRow[1+ii]=myFormatter.format(importe2);
   }
 private void iniciar_modelo_articulsmasven()
    {
        jtable_modelo_amv=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_amv.addColumn("<html><b>Lugar</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Item</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Importe</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Familia</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Linea</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Tem. Venta</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Foto</b></html>");
        jtable_modelo_amv.addColumn("<html><b>Id</b></html>");
   }

private void iniciar_modelo_artialma()
    {

        jtable_modelo_artialma=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_artialma.addColumn("Familia");
        jtable_modelo_artialma.addColumn("Sub_fam.");
        jtable_modelo_artialma.addColumn("Clave");
        jtable_modelo_artialma.addColumn("Descripcion.");
        jtable_modelo_artialma.addColumn("Control Alm.");
        jtable_modelo_artialma.addColumn("Item.");
        jtable_modelo_artialma.addColumn("Costo");
        jtable_modelo_artialma.addColumn("Precio");
        jtable_modelo_artialma.addColumn("F. Ult. Compra");
        jtable_modelo_artialma.addColumn("Existencia");
        jtable_modelo_artialma.addColumn("Observaciones");
   }

private void iniciar_modelo_comprasxmes()
    {
         jtable_modelo_comprasxmes=new javax.swing.table.DefaultTableModel();//Creo el modelo
         jtable_modelo_comprasxmes.addColumn("<html><b>Mes</b></html>");
         jtable_modelo_comprasxmes.addColumn("<html><b>Cantidad Piezas</b></html>");
         jtable_modelo_comprasxmes.addColumn("<html><b>Importe Costo</b></html>");
   }
private void iniciar_modelo_artiexistencias()
    {
        jtable_modelo_existencias=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_existencias.addColumn("Clave");
        jtable_modelo_existencias.addColumn("Descripcion.");
        jtable_modelo_existencias.addColumn("Item");
       //se crea intancia de la clase conexion
    }
private void iniciar_modelo_comprasxfam_detxprov_arti()
        {
            jtable_modelo_comxfam_detpro_artis=new javax.swing.table.DefaultTableModel();//Creo el modelo
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Familia</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Proveedor</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Id Articulo</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Descripcion</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Costo</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>P.Publico</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Pzas Com</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Costo C.</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Costo C.I.</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>P.Publico</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Pz Vendidas</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Costo Vend</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>Precio Ven</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>E.bod</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>E.Tienda</b></html>");
            jtable_modelo_comxfam_detpro_artis.addColumn("<html><b>% rot</b></html>");
        }

private void iniciar_modelo_tiendasexis()
    {
        try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_tiendas_activas() as (tie_descri character varying(35),tie_id integer,tie_desesque character varying(25),idclie character varying(12));",variables_global.getconexiongral());
               while (rs.next())
                    {
                      jtable_modelo_existencias.addColumn("<html><b>"+rs.getString("tie_id")+":"+rs.getString("tie_descri")+":"+rs.getString("idclie")+"</b></html>");
                    }
               controltiendas=1;
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }



    }

private void loadcom_status()
    {
            try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_proveedores_status() as (id smallint,describe text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcbx_idstatus.addItem(rs.getString("id")+":"+rs.getString("describe"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

    }
private void loadcom_clasif()
    {
            try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_proveedores_clasif() as (id character varying(10),describe character varying(40),observa character varying(30));",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcbx_clasificacion.addItem(rs.getString("id")+":"+rs.getString("describe"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

    }

private void loadcom_ctacontrol()
    {
            this.jcbx_ctacontrol.addItem("1:Prov.Mercancia");
            try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_proveedores_ctacontrol() as (id smallint,describe text,observa text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcbx_ctacontrol.addItem(rs.getString("id")+":"+rs.getString("describe"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

    }


private void contruir_reporte_resumen(int opcion,String idtie,String fechai,String fecha,String idclasif)
    {
        //fecha es la final del reporte

        DecimalFormat miformat = new DecimalFormat("###,###,###,###");
        int numerotiendas=this.jtable_modelo_resumen.getColumnCount()-2;
        String mespartido[]=null,text="";
        float importecosto=0;
        int columnatitulo=0;
               try{
                 //rs = x.sieuno_ventas_cortedia(tienda,pFecha,i);
                 text="select * from x1ventasxdiferentesclasificaciones("+opcion+",'"+idtie+"','"+fechai+"','"+fecha+"',"+idclasif+") as (id integer, can real,importe double precision,importecosto double precision,utilidad double precision,nom text);";
                 System.out.println(text);
                 rs=x.sieuno_executediversosv2(text,variables_global.getconexiongral());
                 while (rs.next())
                        {
                            mespartido=rs.getString("nom").split(":");
                            columnatitulo=this.findcolumna_idtiendaresumen(mespartido[0]);
                            jtable_modelo_resumen.setValueAt(miformat.format(rs.getFloat("can")),0 ,columnatitulo);
                            jtable_modelo_resumen.setValueAt(miformat.format(rs.getFloat("importe")),1 ,columnatitulo);
                            jtable_modelo_resumen.setValueAt(miformat.format(rs.getFloat("importecosto")),2 ,columnatitulo);
                            jtable_modelo_resumen.setValueAt(miformat.format(rs.getFloat("utilidad")),3 ,columnatitulo);
                        }
                    }
                     catch(Exception e)
                        {
                             System.out.println(e.getMessage());
                        }
        
         try
            {
                 //rs = x.sieuno_ventas_cortedia(tienda,pFecha,i);
                 text="select * from x1sieuno_articulo_costos_varios("+opcion+",0,'"+idclasif+"','') as (idsubfam integer,importe double precision,nombre text);";
                 rs=x.sieuno_executediversosv2(text,variables_global.getconexiongral());
                 while (rs.next())
                        {
                            mespartido=rs.getString("nombre").split(":");
                            columnatitulo=this.findcolumna_idtiendaresumen(mespartido[0]);
                            importecosto+=rs.getFloat("importe");
                            jtable_modelo_resumen.setValueAt(miformat.format(rs.getFloat("importe")),5,columnatitulo);
                        }
                        jtable_modelo_resumen.setValueAt("<html><h3><b>"+miformat.format(importecosto)+"</b></h3></html>",5,numerotiendas+1);
             }
                 catch(Exception e)
                     {
                             System.out.println(e.getMessage());
                     }

                     this.contruir_totales_resumen();

 }

private void carga_datos_proveedor(int opcion,String textobusca)
    {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       Object[] fnewRow = new Object[12];
       try
       {
            rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_proveedores("+opcion+",'"+textobusca+"') as (idpro character varying(12),descripcion character varying(60),direccion character varying(50),colonia character varying(50),poblacion character varying(40),cp character varying(6),rfc character varying(15),curp character varying(20),telefono character varying(30),fax character varying(15),email character varying(50),clasificacion character varying(10),diascredito smallint,limitecredito numeric,descproveedor numeric,fecultventa date,fecultpago date,inicialprovee character varying(20),observa character varying(80),inicialesfinal character varying(3),ctacontrol smallint,subfam smallint,idstatus smallint,acumuladocom numeric,bitacora text,descripclasif character varying(40),obserclasif character varying(30),descripcuenta text,obsercuenta text,describestatus text);",variables_global.getconexiongral());
            while (rs.next())
                {
                       fnewRow[0]=rs.getString("descripcuenta");
                       this.jcbx_idstatus.addItem(rs.getString("idstatus")+":"+rs.getString("describestatus"));
                       this.jtf_provid.setText(rs.getString("idpro"));
                       this.jtf_idprovnuevo.setText(rs.getString("idpro"));
                       this.jtf_provnombre.setText(rs.getString("descripcion"));
                       this.jtf_domcalle.setText(rs.getString("direccion"));
                       this.jtf_domcolonia.setText(rs.getString("colonia"));
                       this.jtf_dompobla.setText(rs.getString("poblacion"));
                       this.jtf_domcod.setText(rs.getString("cp"));
                       this.jtf_domtelefono.setText(rs.getString("telefono"));
                       this.jtf_email.setText(rs.getString("email"));
                       this.jtf_fax.setText(rs.getString("fax"));
                       this.jcbx_clasificacion.addItem(rs.getString("clasificacion")+":"+rs.getString("descripclasif"));
                       this.jcbx_ctacontrol.addItem(rs.getString("ctacontrol")+":"+rs.getString("descripcuenta"));
                       this.jtf_diascredito.setText(rs.getString("diascredito"));
                       this.jtf_limitecredito.setText(rs.getString("limitecredito"));
                       this.jtf_porcendescuento.setText(rs.getString("descproveedor"));
                       this.jtf_fultcompra.setText(rs.getString("fecultventa"));
                       this.jtf_fultpago.setText(rs.getString("fecultpago"));
                       this.jtf_inicialarticulos.setText(rs.getString("inicialprovee"));
                       this.jtf_termiarti.setText(rs.getString("inicialesfinal"));
                       this.jtf_idsubfamilia.setText(rs.getString("subfam"));
                       this.jtf_acumuladocomp.setText(rs.getString("acumuladocom"));
                       this.jep_observaciones.setText(rs.getString("observa"));
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

   }

private void carga_datos_compras(int opbus,String tbusca)
    {
        String fechacat = "",fechallegatienda="",fechaentrega="",abrehtml="",cierrahtml="";
        DecimalFormat miformat = new DecimalFormat("###,###,###,###");
        Object[] fnewRow = new Object[13];
       //invoco al metodo que trae el recordset de datos

        try
         {
       rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_compras_catalogo("+opbus+",'"+tbusca+"') as (idreg integer,iddocumento character varying(12),idstatus smallint,statusdescribe character varying(15),doctoanterior character varying(12),fechadocto date,fechadoctoenmes text,idproveedor character varying(12),describeproveedor character varying(60),observadocto character varying(80),usuario character varying(20),impuestoporcen numeric,descuentototal numeric,clasificacion smallint,describeclasificacion character varying(30),clasifechainicio date,clasifechafin date,clavepersonaldoc character varying(45),docsiguiente character varying(12),fechaentrega date,fechavenci date,impuestoporcen2 numeric,descuentofinan numeric,piezas numeric,totalimporte numeric,totalprecio numeric,idsubfam smallint,diasenalmacen integer,diasproveealmacen integer);",variables_global.getconexiongral());
            while (rs.next())
                {
                   if(rs.getInt("idstatus") > 3)
                        {
                            abrehtml="<html><b><font color=#CC0000>";
                            cierrahtml="<font></b></html>";
                        }
                   else
                        {
                            abrehtml="<html>";
                            cierrahtml="</html>";
                        }
                 fnewRow[0]=abrehtml+rs.getString ("statusdescribe")+cierrahtml;
                 fnewRow[1]=rs.getString ("iddocumento");
                 fnewRow[2]=abrehtml+rs.getString ("doctoanterior")+cierrahtml;
                 fnewRow[3]=abrehtml+this.fechaeuropea( rs.getString ("fechadocto"))+":<br>"+DiaSemana(this.fechaeuropea(rs.getString("fechadocto")))+cierrahtml;
                 if(rs.getString("fechaentrega") != null)
                        {
                           fechallegatienda=abrehtml+ rs.getString("fechaentrega")+":<br>"+DiaSemana(rs.getString ("fechaentrega"))+cierrahtml;
                        }
                 fnewRow[4]=fechallegatienda;
                 if(rs.getString("fechavenci") != null )
                        {
                            fechaentrega=abrehtml+rs.getString ("fechavenci")+":<br>"+this.DiaSemana(rs.getString("fechavenci"))+cierrahtml;
                        }
                 fnewRow[5]=fechaentrega;
                 fnewRow[6]="";
                 fnewRow[7]=abrehtml+rs.getString ("clasificacion")+":"+rs.getString ("describeclasificacion")+cierrahtml;
                 fnewRow[8]=abrehtml+rs.getString ("idproveedor")+":"+rs.getString ("describeproveedor")+cierrahtml;
                 fnewRow[9]=abrehtml+miformat.format(rs.getFloat("piezas"))+cierrahtml;
                 fnewRow[10]=abrehtml+miformat.format(rs.getFloat("totalimporte"))+cierrahtml;
                 fnewRow[11]=abrehtml+miformat.format(rs.getFloat("totalprecio"))+cierrahtml;
                 fnewRow[12]=abrehtml+rs.getString ("observadocto")+cierrahtml;

                 jtable_modelo.addRow(fnewRow);
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        this.cambiartamanofilas();
      }

private void cargar_datosinvextie(int subf)
{
      //inicio proceso para informar de las promociones en cada tienda
            //INICIO PROCESO PARA INFORMAR DE LAS PROMOCIONES EN CADA TIENDA
            String mespartido[]=null,texto2="";
            java.util.Date fechainicial=new Date();
            ResultSet rs2 = null;
            float importe=0,importe2=0,acumulado=0,piezas=0,piezas2=0;
            int columnatitulo=0;
            DecimalFormat miformat = new DecimalFormat("###,###,###,###");
            importe=0;
            try
            {
                texto2="select * from x1sieuno_articulo_costosxsubfamyexisv3(1,'0',"+subf+") as (subfam integer,piezas double precision, costo double precision,nombre text);";
                System.out.println(texto2);
                rs = x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
            while (rs.next())
                {
                    mespartido=rs.getString("nombre").split(":");
                    columnatitulo=this.findcolumna_idtiendainve(mespartido[0]);
                    jtable_modelo_invextie.setValueAt(miformat.format(rs.getFloat("piezas")),0 ,columnatitulo);
                    jtable_modelo_invextie.setValueAt(miformat.format(rs.getFloat("costo")),1 ,columnatitulo);
                }//consulto la bd
             }
             catch(Exception e)
                 {
                     System.out.println(e.getMessage());
                 }
            try
            {
            texto2="select * from x1distribucion_terminados_almacen_costosproveedor(2,'"+this.jtf_provid.getText()+"') as (idpro character varying(12),existencia numeric,importecosto numeric, importeprecio numeric,descri_proveedor character varying(60));";
            System.out.println(texto2);
            rs = x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
            while (rs.next())
                {

                    columnatitulo=this.findcolumna_idtiendainve("D");
                    jtable_modelo_invextie.setValueAt(miformat.format(rs.getFloat("existencia")),0 ,columnatitulo);
                    jtable_modelo_invextie.setValueAt(miformat.format(rs.getFloat("importecosto")),1 ,columnatitulo);
                }//consulto la bd
             }
             catch(Exception e)
                 {
                     System.out.println(e.getMessage());
                 }
            this.contruir_totales_invetien();
}

private void cargar_datosarmasven(int opcion,String fechai,String fecha,String filtro,String idesq)
    {
        //fecha es la final del reporte
        DefaultCategoryDataset dataset = new DefaultCategoryDataset();//detalle por tienda
        String titulografico="",titulograficoh="",ti="",texto2="";
         while(jtable_modelo_amv.getRowCount()>0)jtable_modelo_amv.removeRow(0);
        DecimalFormat miformat = new DecimalFormat("###,###,###,###");
        int ii=0,idtienda=0,ndias=0,reg=0,noaten=0;
        //indicamos 7 columnas
        Object valtie = null;
        String serie1="",tienda="";
        Object[] fnewRow = new Object[11];
        float importe=0,totalpiezas=0,totcosto=0,totutili=0,totporcen=0,totporcenacum=0,importe2=0,importe3=0;
        int rankin=0;
            try{
                 //rs = x.sieuno_ventas_cortedia(tienda,pFecha,i);
                texto2="select * from x1sieuno_articulo_masvendidosv3("+opcion+","+filtro+",'"+idesq+"','"+fechai+"','"+fecha+"') as (id integer, can real,importe double precision,clavepro character varying(16),desclave character varying(80),itemclave character varying(80),nomfamclave character varying(30),nomsubfam character varying(50),nomtemventa character varying(25),descriplinea character varying(25));";
                 System.out.println(texto2);
                 rs=x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
                 while (rs.next())
                        {
                            rankin++;
                            totalpiezas+=rs.getFloat(2);
                            importe+=rs.getFloat(3);
                              fnewRow[0]=""+rankin+"";
                              fnewRow[1]=""+rs.getString("clavepro")+"";

                              fnewRow[2]=""+rs.getString("desclave")+"";
                              fnewRow[3]=""+rs.getString("itemclave")+"";
                              fnewRow[4]="<html><h4><b>"+miformat.format(rs.getFloat("can"))+"</b></h4></html>";
                              fnewRow[5]="<html><h4><b>"+miformat.format(rs.getFloat("importe"))+"</b></h4></html>";
                              fnewRow[6]=""+rs.getString("nomfamclave").toUpperCase()+"";
                              fnewRow[7]=""+rs.getString("descriplinea").toUpperCase()+"";
                              fnewRow[8]=""+rs.getString("nomtemventa").toUpperCase()+"";
                              fnewRow[9]="";
                              fnewRow[10]=""+rs.getString("id")+"";
                              jtable_modelo_amv.addRow(fnewRow);
                        }
                    }
                     catch(Exception e)
                     {
                             System.out.println(e.getMessage());
                     }

           jtable_modelo_amv.addRow(new Object[]{"<html><h3><b>Totales: "+"</b></h3></html>","","<html><h3><b>","","<html><h3><b>"+miformat.format(totalpiezas)+"</b></h3></html>","<html><h3><b>"+miformat.format(importe)+"</b></h3></html>","","",""});
            this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo_amv.getRowCount()));

 }
private void cargar_datoscomprasxmes(int subf)
{
      //inicio proceso para informar de las promociones en cada tienda
            //INICIO PROCESO PARA INFORMAR DE LAS PROMOCIONES EN CADA TIENDA
            String texto="",texto2="";
            java.util.Date fechainicial=new Date();
            ResultSet rs2 = null;
             float importe=0,importe2=0,acumulado=0,piezas=0,piezas2=0;
            DecimalFormat myForma = new DecimalFormat("###,###,###,###");


            Object[] fnewRow = new Object[3];
                 importe=0;
                       texto2="select * from x1distribucion_compras_subfamxmes("+subf+")  as (fecha date,fe text,subfam smallint,piezas numeric, importeneto numeric);";

                            System.out.println(texto2);
                            try{
                                  rs2 = x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
                                  while (rs2.next())
                                    {
                                      fnewRow[0]="<html><h4><b>"+rs2.getString("fe")+"</b></h4></html>";
                                      fnewRow[1]=""+myForma.format(rs2.getFloat("piezas"))+"";
                                      fnewRow[2]=""+myForma.format(rs2.getFloat("importeneto"))+"";
                                      jtable_modelo_comprasxmes.addRow(fnewRow);
                                    }//consulto la bd
                                }
                            catch(Exception e)
                                {
                                    System.out.println(e.getMessage());
                                }

}
 private void executabusqueda(int bus,int opbus,String busqueda)
 {

     while(jtable_modelo_existencias.getRowCount()>0)jtable_modelo_existencias.removeRow(0);
      Object[] fnewRowe = new Object[3];
       //this.jtb_catalogo_articulos.repaint();
       //invoco al metodo que trae el recordset de datos
       //rs = x.damecat_art(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase());
       String texto="select * from x1sieuno_articulo_catalogov2("+bus+","+opbus+",'"+busqueda+"') as (id integer, cla character varying(16),cod character varying(16), des character varying(80), ultimocosto numeric,fa integer,sub integer,it character varying(80),pre numeric, fe date, tei smallint,tev smallint,lineaarti smallint,controalmacen character varying(20),statusarticulo smallint,unidadempaque character varying(8),sublinea smallint,ob character varying(80),nomfa character varying(30), nomsub character varying(50),tementr character varying(25),descriplinea character varying(25),describestatus character varying(25),describesublinea character varying(25),describetemventa character varying(25))";
        System.out.println(texto);
       try
        {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                  fnewRowe[0]=rs.getString ("cla");
                  fnewRowe[1]=rs.getString ("id")+":"+rs.getString ("des");
                  fnewRowe[2]=rs.getString ("it")+".";
                  jtable_modelo_existencias.addRow(fnewRowe);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }

 }


private void carga_articulo_estadisticas(String idtienda,String idpro)
    {
            Object[] fnewRow = new Object[12];
            int diasdif=0,diasdifprimer=0,diasdifultimo=0;
             DecimalFormat miformat = new DecimalFormat("############.##");
            float totalexist=0;
            String idcadena[]=null;
                 while(jtable_modelo_estadisticas.getRowCount()>0)jtable_modelo_estadisticas.removeRow(0);
            String texto2="select * from x1sieuno_articulo_ventas_estadisticasv3(1,0,"+idpro+") as (min integer,max integer,exi numeric,preve double precision,pre_re real,clavepro text,acumventas numeric,primerv date,ultimav date,nmovent numeric,piezasent numeric,diasvsprimerventa integer,diasvsultimaventa integer,diasenvenderse integer,fucom date,fatraspaso date,fautpromo date)";
            System.out.println(texto2);
            try
                {
                 rs = x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
                          while (rs.next())
                            {
                                    idcadena=rs.getString("clavepro").toString().split(":");
                                    diasdif=0;
                                    diasdifprimer=0;
                                    diasdifultimo=0;
                                    fnewRow[0]=idcadena[2]+":"+idcadena[1];
                                    fnewRow[1]=miformat.format(rs.getFloat("nmovent"));
                                    fnewRow[2]=miformat.format(rs.getFloat("piezasent"));
                                    if(rs.getString("fucom") != null)
                                        {
                                            fnewRow[3]="<html>"+this.fechaeuropea(rs.getString("fucom"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[3]="";
                                        }
                                    fnewRow[4]=miformat.format(rs.getFloat("acumventas")*-1);
                                    if(rs.getString("primerv") != null)
                                        {
                                            //diasdifprimer=this.fechasDiferenciaEnDias(this.fechadecadenaadate(rs.getString("primerv")),fechaactual);
                                            fnewRow[5]="<html>"+this.fechaeuropea(rs.getString("primerv"))+"<br>"+this.mensajetiempo(rs.getInt("diasvsprimerventa"))+"</html>";
                                            //diasdif=this.fechasDiferenciaEnDias(this.fechadecadenaadate(rs.getString("primerv")),this.fechadecadenaadate(rs.getString("ultimav")));
                                            //fnewRow[7]="<html>"+this.mensajetiempodias(rs.getInt("diasenvenderse"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[5]="";
                                            
                                        }
                                    if(rs.getString("ultimav") != null)
                                        {
                                            if(rs.getFloat("exi")<=0)
                                                {
                                                fnewRow[6]="<html><font color=\"red\">"+this.fechaeuropea(rs.getString("ultimav"))+"<br>Agotado"+this.mensajetiempo(rs.getInt("diasvsultimaventa"))+"</font></html>";
                                                    //fnewRow[12]="<html><font color=\"red\">"+"Agotado"+this.mensajetiempo(diasdifultimo)+"</font></html>";
                                                }
                                            else
                                                {
                                                fnewRow[6]="<html>"+this.fechaeuropea(rs.getString("ultimav"))+"<br>"+this.mensajetiempo(rs.getInt("diasvsultimaventa"))+"</html>";
                                                }
                                        }
                                    else
                                        {
                                            fnewRow[6]="";
                                        }
                                    //fnewRow[8]=miformat.format(rs.getFloat("preve"));
                                    //fnewRow[9]=rs.getString("pre_re");
                                    fnewRow[7]=miformat.format(rs.getFloat("min"));
                                    fnewRow[8]=miformat.format(rs.getFloat("max"));
                                    fnewRow[9]=miformat.format(rs.getFloat("exi"));
                                    if(rs.getString("fatraspaso") != null)
                                        {
                                            fnewRow[10]="<html>"+this.fechaeuropea(rs.getString("fatraspaso"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[10]="";
                                        }
                                    if(rs.getString("fautpromo") != null)
                                        {
                                            fnewRow[11]="<html>"+this.fechaeuropea(rs.getString("fautpromo"))+"</html>";
                                        }
                                    else
                                        {
                                            fnewRow[11]="";
                                        }
                                    totalexist+=rs.getFloat("exi");
                                    jtable_modelo_estadisticas.addRow(fnewRow);
                            }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }

}

 private String mensajetiempo(int nd) {
     String mensaje="";
     if (nd==0)
				{
					mensaje=" Hoy ";
				}
		if (nd==1)
				{
					mensaje=" ayer ";
				}
		if (nd>1)
				{
					mensaje=" Hace " + nd + " Dias " ;
				}
     if (nd<0)
				{
					mensaje=" Vence En " + nd + " Dias " ;
				}
 	return mensaje;
 }
private String mensajetiempodias(int nd) {
     String mensaje="";
     if (nd==0)
				{
					mensaje=" Hoy ";
				}
		if (nd==1)
				{
					mensaje=" ayer ";
				}
		if (nd>1)
				{
					mensaje= nd + " Dias " ;
				}
     if (nd<0)
				{
					mensaje= nd + " Dias " ;
				}
 	return mensaje;
 }
private int findcolumna_idtienda (String titulo)  {
  int columnas = jtable_modelo_distribucion.getColumnCount(),columencontrado=0;
  String columtitulo[]=null;
      for(int j = 0 ;j < columnas ; j++)
                {
                    columtitulo= jtable_modelo_distribucion.getColumnName(j).replace("<html><b>","").split(":");
                     System.out.println("Busqueda:"+columtitulo[0]+" "+titulo);
                    if(columtitulo[0].equals(titulo))
                        {
                            columencontrado=j;
                             System.out.println(titulo+" "+columtitulo[0]+" "+columencontrado);
                        }
                }
    return columencontrado;
}
private int findcolumna_idtiendaresumen (String titulo)  {
  int columnas = jtable_modelo_resumen.getColumnCount(),columencontrado=0;
  String columtitulo[]=null;
      for(int j = 0 ;j < columnas ; j++)
                {
                    columtitulo= jtable_modelo_resumen.getColumnName(j).replace("<html><b>","").split(":");
                     System.out.println("Busqueda:"+columtitulo[0]+" "+titulo);
                    if(columtitulo[0].equals(titulo))
                        {
                            columencontrado=j;
                             System.out.println(titulo+" "+columtitulo[0]+" "+columencontrado);
                        }
                }
    return columencontrado;
}
private int findcolumna_idtiendainve (String titulo)  {
  int columnas = jtable_modelo_invextie.getColumnCount(),columencontrado=0;
  String columtitulo[]=null;
      for(int j = 0 ;j < columnas ; j++)
                {
                    columtitulo= jtable_modelo_invextie.getColumnName(j).replace("<html><b>","").split(":");
                     System.out.println("Busqueda:"+columtitulo[0]+" "+titulo);
                    if(columtitulo[0].equals(titulo))
                        {
                            columencontrado=j;
                             System.out.println(titulo+" "+columtitulo[0]+" "+columencontrado);
                        }
                }
    return columencontrado;
}
private void crea_hoja_distribucionalmacen(String codigo,String cantidad,int columna,String item,float costo,float precio5,String foliodistri,String fecha)
    {
        DecimalFormat miformat = new DecimalFormat("###,###,###");
        int numerofilas=this.jtable_modelo_distribucion.getRowCount();
        String idstat="",foliodis="",canan="";
        int numerocolumnas=this.jtable_modelo_distribucion.getColumnCount(),ii=00;
        int encontrado=0;
        Object[] fnewRow = new Object[numerocolumnas];
        float cantifam=0;
       //invoco al metodo que trae el recordset de datos
        cantifam=Float.valueOf(cantidad);
        for( ii=0;ii<numerofilas;ii++)
                {
                    idstat=jtable_modelo_distribucion.getValueAt(ii, 2).toString();
                    foliodis=jtable_modelo_distribucion.getValueAt(ii, 0).toString();
                    
                    if (idstat.equals(codigo))
                        {
                            System.out.println("Agregando:"+cantidad+" "+codigo);
                            encontrado=1;
                            canan=jtable_modelo_distribucion.getValueAt(ii, columna).toString();
                            jtable_modelo_distribucion.setValueAt(miformat.format(cantifam+Float.valueOf(canan)),ii ,columna);
                            //jtable_modelo_distribucion.setValueAt(foliodis+","+foliodistri,ii ,0);
                        }
                }
       if(encontrado==0)
            {
            fnewRow[0]=foliodistri;
            fnewRow[1]=fecha;
            fnewRow[2]=codigo;
            fnewRow[3]=item;
            fnewRow[4]=miformat.format(costo);
            fnewRow[5]=miformat.format(precio5);
            for(ii=6;ii<numerocolumnas;ii++)
                {
                     //          System.out.println(mes);
                               if(ii==columna)
                                    {
                                        fnewRow[ii]=miformat.format(cantifam);
                                    }
                               else
                                    {
                                        fnewRow[ii]="0";
                                    }
                }
             jtable_modelo_distribucion.addRow(fnewRow);
           }
    }

private void carga_datos_distribucionalma(String idprov)
    {
    String fechaeuro="";
    int columnatitulo=0;
    String mespartido="";
    int ncol=this.jtable_modelo_distribucion.getColumnCount();
    Object[] fnewRow = new Object[ncol];
    rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_articulos_distribucion(3,'"+idprov+"',1) as (folio integer,fechamov date,referenciainve character varying(12),clave_clie_prov character varying(16),idarticuloinve character varying(16),cantidadinve numeric,precioinve numeric,costoinve numeric,folioref smallint,idprovee character varying(12),precio5 numeric,valorxitem character varying(20),clasif1 smallint);",variables_global.getconexiongral());
        try
            {
            while (rs.next())
                {
                        mespartido=rs.getString("clave_clie_prov");
                        columnatitulo=this.findcolumna_idtienda(mespartido);
                        this.crea_hoja_distribucionalmacen(rs.getString("idarticuloinve"),rs.getString("cantidadinve").replace("-", ""),columnatitulo,rs.getString("valorxitem"),rs.getFloat("costoinve"),rs.getFloat("precio5"),rs.getString("referenciainve"),this.fechaeuropea(rs.getString("fechamov")));
                }
            }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
     fnewRow[0]="Total Piezas:";
     jtable_modelo_distribucion.addRow(fnewRow);
     fnewRow[0]="Total Importe:";
     jtable_modelo_distribucion.addRow(fnewRow);
     this.contruir_totales_distribucionalma();
     }
private int findcolumna_idtiendaexi(String titulo)  {
        int columnas = jtable_modelo_existencias.getColumnCount(),columencontrado=0;
        String columtitulo[]=null;
      for(int j = 2 ;j < columnas ; j++)
            {
                   columtitulo= jtable_modelo_existencias.getColumnName(j).replace("<html><b>","").replace("</b></html>","").split(":");
                if(columtitulo[0].equals(titulo))
                    {
                            columencontrado=j;
                            j=columnas;
                    }
            }
    //System.out.println("Esto encontro:"+columencontrado);
    return columencontrado;
}
private void crea_hoja_agregaexistencias(String codigo,String existencia,int columna,String smin,String smax)
    {
        DecimalFormat miformat = new DecimalFormat("###,###,###");
        int numerofilas=this.jtable_modelo_existencias.getRowCount(),numerocolumnas=this.jtable_modelo_existencias.getColumnCount(),ii=00,encontrado=0;
        String mesactual="",colorabre="",colorcierra="";

        float abononumerico=0,importe=0;
       //invoco al metodo que trae el recordset de datos
        abononumerico=Float.valueOf(existencia);

        importe=100-((Float.valueOf(existencia)/Float.valueOf(smax))*100);
        //System.out.println("Verificando :"+smax+" "+existencia+ " "+importe);
                if (importe<=50)
                    {
                        colorabre="<b><font color=#CC0000>";
                        colorcierra="<font></b>";
                    }
                if ((importe>50) && (importe<=75))
                    {
                        colorabre="<b><font color=#FF6633>";
                        colorcierra="<font></b>";
                    }
                if (importe>75)
                    {
                        colorabre="<font color=#008000>";
                        colorcierra="<font>";
                    }
                if ((importe==0) && (abononumerico==0))
                    {
                        colorabre="";
                        colorcierra="";
                    }
        for( ii=0;ii<numerofilas;ii++)
                {
                    mesactual=jtable_modelo_existencias.getValueAt(ii, 0).toString();
                    // System.out.println("Agregando:"+mesactual+" "+mes);
                    if (mesactual.equals(codigo))
                        {
                            encontrado=1;


                            jtable_modelo_existencias.setValueAt("<html><b>"+colorabre+"M"+smin+" Mx"+smax+" E="+miformat.format(abononumerico)+colorcierra+"</b></html>",ii ,columna);
                        }
                }
    }

private void crea_hoja_agregaexistencias2(String codigo,String existencia,int columna,String smin,String smax)
    {
        DecimalFormat miformat = new DecimalFormat("############.####");
        DecimalFormat miformat2 = new DecimalFormat("############.##");
        int numerofilas=this.jtable_modelo_comxfam_detpro_artis.getRowCount(),ii=00,encontrado=0;
        String mesactual="",colorabre="",colorcierra="";
        double importe;
        for( ii=0;ii<numerofilas;ii++)
                {
                    mesactual=jtable_modelo_comxfam_detpro_artis.getValueAt(ii, 2).toString();
                    // System.out.println("Agregando:"+mesactual+" "+mes);
                    if (mesactual.equals(codigo))
                        {
                            encontrado=1;
                            if(columna==1)
                                {
                                importe=(Float.valueOf(existencia)/Float.valueOf(jtable_modelo_comxfam_detpro_artis.getValueAt(ii, 6).toString()))*100;
                                jtable_modelo_comxfam_detpro_artis.setValueAt(existencia,ii ,10);
                                jtable_modelo_comxfam_detpro_artis.setValueAt(miformat.format(Float.valueOf(jtable_modelo_comxfam_detpro_artis.getValueAt(ii, 4).toString())*Float.valueOf(existencia)),ii ,11);
                                jtable_modelo_comxfam_detpro_artis.setValueAt(smin,ii ,12);
                                jtable_modelo_comxfam_detpro_artis.setValueAt(miformat2.format(importe)+"%",ii ,15);
                                }
                            if(columna==2)
                                {
                                jtable_modelo_comxfam_detpro_artis.setValueAt(existencia,ii ,13);
                                jtable_modelo_comxfam_detpro_artis.setValueAt(smin,ii ,14);
                                }
                            numerofilas=jtable_modelo_comxfam_detpro_artis.getRowCount();

                        }
                }
    }
private void verexistencias()
        {
 
    int numerofilas = this.jtable_modelo_existencias.getRowCount(),ii=0;
    String selectin="";
        for( ii=0;ii<numerofilas;ii++)
                {
                if (ii>0)
                    {
                        selectin+=".";
                    }
                selectin+=""+jtable_modelo_existencias.getValueAt(ii ,0)+"";
                }
            String texto="select * from x1sieuno_articulo_detalle(1,0,'','"+selectin+"') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text)";
            System.out.println(texto);
            String despartido[]=null,mi="",ma="";
            int columnatitulo=0;
            try
                {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            despartido=rs.getString("descor").split(":");

                            columnatitulo=this.findcolumna_idtiendaexi(despartido[0]);
                            System.out.println(rs.getString("descor")+"en columna:"+columnatitulo);
                            if ((rs.getString("max")!=null) && (rs.getString("min")!=null))
                                {
                                    mi=rs.getString("min");
                                    ma=rs.getString("max");

                                }
                            else
                                {
                                    mi="0";
                                    ma="0";
                                }
                            if ( columnatitulo>0)
                                {
                                     this.crea_hoja_agregaexistencias(rs.getString("clavepro"),rs.getString("exi"),columnatitulo,mi,ma);
                                }
                        }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
        }
private void contruir_totales_distribucionalma()
    {
         DecimalFormat myFormatter = new DecimalFormat("###,###,###");
         float totalve=0,totgeneral=0,totalimporte=0;
         int totalfilasreporte=this.jtable_modelo_distribucion.getRowCount()-2,i=0,ii=0;
         int numerotiendas=this.jtable_modelo_distribucion.getColumnCount()-7;
         //genero los totales por tienda
          System.out.println("aqui ta chingando la madre"+numerotiendas);
         for( ii=0;ii<numerotiendas;ii++)
            {
             totalve=0;
             totalimporte=0;
                for(i=0;i<totalfilasreporte;i++)
                    {
                        totalve+=Float.valueOf(jtable_modelo_distribucion.getValueAt(i, ii+6).toString().replace(",","").replace(".",""));
                        totalimporte+=Float.valueOf(jtable_modelo_distribucion.getValueAt(i, ii+6).toString().replace(",","").replace(".",""))*Float.valueOf(jtable_modelo_distribucion.getValueAt(i, 4).toString());
                    }
                    jtable_modelo_distribucion.setValueAt("<html><h3><b>"+myFormatter.format(totalve)+"</b></h3></html>",i,ii+6);
                    jtable_modelo_distribucion.setValueAt("<html><h3><b>"+myFormatter.format(totalimporte)+"</b></h3></html>",i+1,ii+6);
                    totgeneral+=totalve;
            }
           totalve=0;
           for(i=0;i<totalfilasreporte;i++)
                  {
                        totalve=0;
                        for( ii=0;ii<numerotiendas;ii++)
                        {
                            totalve+=Float.valueOf(jtable_modelo_distribucion.getValueAt(i, ii+6).toString().replace(",","").replace(".",""));
                        }
                        jtable_modelo_distribucion.setValueAt("<html><h3><b>"+myFormatter.format(totalve)+"</b></h3></html>",i,ii+6);
                  }
           totalve=0;
           Object[] fnewRow = new Object[numerotiendas+6];
           fnewRow[0]="%";
           for( ii=0;ii<numerotiendas;ii++)
                {
                        totalve=Float.valueOf(jtable_modelo_distribucion.getValueAt(totalfilasreporte, ii+6).toString().replace(",","").replace(".","").replace("<html><h3><b>","").replace("</b></h3></html>", ""));
                        fnewRow[ii+6]="<html><h3><b>"+myFormatter.format((totalve/totgeneral)*100)+"%</b></h3></html>";
                }
           jtable_modelo_distribucion.addRow(fnewRow);
     }
private void contruir_totales_invetien()
    {
         DecimalFormat myFormatter = new DecimalFormat("###,###,###");
         float totalve=0,totgeneral=0,totalimporte=0;
         int totalfilasreporte=this.jtable_modelo_invextie.getRowCount(),i=0,ii=0;
         int numerotiendas=this.jtable_modelo_invextie.getColumnCount()-2;
         //genero los totales por tienda
          System.out.println("aqui ta chingando la madre"+numerotiendas);
         
          for(i=0;i<totalfilasreporte;i++)
            {
               totalve=0;
               totalimporte=0;
                    for( ii=0;ii<numerotiendas;ii++)
                            {
                               
                                System.out.println("aqui ta chingando la madre"+jtable_modelo_invextie.getValueAt(i, ii+1).toString());
                                totalimporte+=Float.valueOf(jtable_modelo_invextie.getValueAt(i, ii+1).toString().replace(",","").replace(".",""));
                            }
                    jtable_modelo_invextie.setValueAt("<html><h3><b>"+myFormatter.format(totalimporte)+"</b></h3></html>",i,ii+1);
                    totgeneral+=totalve;
            }
           totalve=0;
            System.out.println("por aki va"+numerotiendas);
           Object[] fnewRow = new Object[numerotiendas+2];
           fnewRow[0]="%";
           for( ii=0;ii<numerotiendas;ii++)
                {
                        totalve=Float.valueOf(jtable_modelo_invextie.getValueAt(totalfilasreporte-1, ii+1).toString().replace(",","").replace(".","").replace("<html><h3><b>","").replace("</b></h3></html>", ""));
                        fnewRow[ii+1]="<html><h3><b>"+myFormatter.format((totalve/totalimporte)*100)+"%</b></h3></html>";
                }
           jtable_modelo_invextie.addRow(fnewRow);
     }
private void cargar_datosarticulosexisyacum(int opcion,String esquema,int subf)
{
      //inicio proceso para informar de las promociones en cada tienda
            //INICIO PROCESO PARA INFORMAR DE LAS PROMOCIONES EN CADA TIENDA
 //inicio proceso para informar de las promociones en cada tienda
            //INICIO PROCESO PARA INFORMAR DE LAS PROMOCIONES EN CADA TIENDA
            String texto="",texto2="",htmlabre="<html><BODY>",htmlcierra="</BODY></html>",colorabre="",colorcierra="";
            java.util.Date fechainicial=new Date();
            ResultSet rs2 = null;
             float importe=0,importe2=0,acumulado=0,piezas=0,piezas2=0,apiezas=0,apiezas2=0;
            DecimalFormat myForma = new DecimalFormat("###,###,###,###");
             DecimalFormat myForma2 = new DecimalFormat("###,###,###,###.##");
           while(jtable_modelo_articyestadis.getRowCount()>0)jtable_modelo_articyestadis.removeRow(0);
       
            Object[] fnewRow = new Object[14];
                 importe=0;
                 
                 switch (opcioncons)
                    {
                        case 1:
                            texto2="select * from x1sieuno_articulo_exist_y_acumventasv2(5,'"+esquema+"','"+subf+"') as (id integer, clave_producto character varying(16),cod_barra character varying(16), descripcion character varying(80), ultimo_cos numeric,id_familia integer,id_subfam integer, item character varying(80), precio_1 numeric, fecha_ult_com date, idtempoingreso smallint,idtempoventa smallint,idlinea smallint,nombrefamilia character varying(30),nombresubfamilia character varying(50),nombretemporada character varying(25),nombrelinea character varying(25),existencia numeric,cantidadvendida numeric,descritemventa character varying(25));";
                        break;
                        case 2:
                            texto2="select * from x1sieuno_articulo_exist_y_acumventasv2(1,'"+esquema+"',"+subf+") as (id integer, clave_producto character varying(16),cod_barra character varying(16), descripcion character varying(80), ultimo_cos numeric,id_familia integer,id_subfam integer, item character varying(80), precio_1 numeric, fecha_ult_com date, idtempoingreso smallint,idtempoventa smallint,idlinea smallint,nombrefamilia character varying(30),nombresubfamilia character varying(50),nombretemporada character varying(25),nombrelinea character varying(25),existencia double precision,cantidadvendida real,descritemventa character varying(25));";
                        break;
                    }
                    System.out.println(texto2);
                        try
                            {
                                  rs2 = x.sieuno_executediversosv2(texto2,variables_global.getconexiongral());
                                  while (rs2.next())
                                    {
                                      fnewRow[0]=""+rs2.getString("nombretemporada")+"";
                                      fnewRow[1]=""+rs2.getString("descritemventa")+"";
                                      fnewRow[2]=""+rs2.getString("nombrefamilia")+"";
                                      fnewRow[3]=""+rs2.getString("id")+"";
                                      fnewRow[4]=""+rs2.getString("clave_producto")+"";
                                      fnewRow[5]=""+rs2.getString("descripcion")+"";
                                      fnewRow[6]=""+rs2.getString("item")+"";
                                      fnewRow[7]=""+rs2.getString("nombrelinea")+"";
                                      fnewRow[8]=""+myForma2.format(rs2.getFloat("ultimo_cos"))+"";
                                      fnewRow[9]=""+myForma2.format(rs2.getFloat("precio_1"))+"";
                                      fnewRow[10]=""+this.fechaeuropea(rs2.getString("fecha_ult_com"))+"";
                                      fnewRow[11]=""+rs2.getString("cantidadvendida")+"";
                                      fnewRow[12]=""+rs2.getString("existencia")+"";
                                      piezas=rs2.getFloat("cantidadvendida");
                                      piezas2=rs2.getFloat("existencia");
                                      apiezas+=rs2.getFloat("cantidadvendida");
                                      apiezas2+=rs2.getFloat("existencia");
                                      acumulado=piezas+piezas2;
                                      importe=(piezas/acumulado)*100;
                                       colorabre="";
                                       colorcierra="";
                                    if (importe<=50)
                                        {
                                            colorabre="<b><font color=#CC0000>";
                                            colorcierra="<font></b>";
                                        }
                                    if ((importe>50) && (importe<=75))
                                            {
                                                colorabre="<b><font color=#FF6633>";
                                                colorcierra="<font></b>";
                                            }
                                      if (importe>75)
                                            {
                                                colorabre="<b><font color=#00FF00>";
                                                colorcierra="<font></b>";
                                            }
                                      fnewRow[13]=htmlabre+colorabre+myForma.format(importe)+"%"+colorcierra+htmlcierra;

                                      jtable_modelo_articyestadis.addRow(fnewRow);
                                    }//consulto la bd
                            }
                        catch(Exception e)
                            {
                                System.out.println(e.getMessage());
                            }

                                      fnewRow[0]="";
                                      fnewRow[1]="";
                                      fnewRow[2]="";
                                      fnewRow[3]="";
                                      fnewRow[4]="";
                                      fnewRow[5]="";
                                      fnewRow[6]="";
                                      fnewRow[7]="";
                                      fnewRow[8]="";
                                      fnewRow[9]="";
                                      fnewRow[10]="";
                                      fnewRow[11]=""+myForma2.format(apiezas)+"";
                                      fnewRow[12]=""+myForma2.format(apiezas2)+"";

                                      acumulado=apiezas+apiezas2;
                                      importe=(apiezas/acumulado)*100;
                                       colorabre="";
                                       colorcierra="";
                                    if (importe<=50)
                                        {
                                            colorabre="<b><font color=#CC0000>";
                                            colorcierra="<font></b>";
                                        }
                                    if ((importe>50) && (importe<=75))
                                            {
                                                colorabre="<b><font color=#FF6633>";
                                                colorcierra="<font></b>";
                                            }
                                      if (importe>75)
                                            {
                                                colorabre="<b><font color=#00FF00>";
                                                colorcierra="<font></b>";
                                            }
                                      fnewRow[13]=htmlabre+colorabre+myForma.format(importe)+"%"+colorcierra+htmlcierra;

                                      jtable_modelo_articyestadis.addRow(fnewRow);
}
private void cargar_datosarticulosalmacen(String busqueda)
 {
       //invoco al metodo que trae el recordset de datos
       //rs = x.damecat_art(buscamp,opbuscamp,this.jtf_busqueda.getText().toUpperCase());
       try
        {
           String texto="select * from x1distribucion_terminados_articulos_catalogo(6,1,'"+busqueda+"') as (id character varying(16),idstatus smallint,statusdescribe text,describearticulo character varying(80),describcorta character varying(20),unsal character varying(3),unent character varying(3),facentruni numeric,uniempaque character varying(12),idtempo smallint,describetemp character varying(40),idfamilia character varying(5),familiadescribe character varying(40),controlalma character varying(20),stocminimo numeric,stocmaximo numeric,precio1 numeric,perecio2 numeric,precio3 numeric,precio4 numeric,precio5 numeric,ultimocosto numeric,costoprom numeric,pensurtir numeric,tiemposurtido smallint,acumprod numeric,acumimporte numeric,idtipoarticulo smallint,tipodescribe character varying(40),fechaprototipo date,fechaautoriza date,fechainiprod date,fechaultimaent date,usuario character varying(20),observacion character varying(255),idprovee character varying(12),nombrecreador character varying(80),valor_x character varying(20),valorx_st character varying(20),idpersonal character varying(16),nombrepersonal character varying(80),descripprovee character varying(60),existencia numeric)";
           rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    jtable_modelo_artialma.addRow(new Object[]{rs.getString ("idfamilia")+":"+rs.getString ("idfamilia"),rs.getString ("idprovee")+":"+rs.getString ("idprovee"),rs.getString ("id"),rs.getString ("describearticulo"),rs.getString ("controlalma"),rs.getString ("valor_x"),rs.getString ("ultimocosto"),rs.getString ("precio5"),rs.getString ("fechaultimaent"),rs.getString ("existencia"),rs.getString ("observacion")});
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
 }
private void cambiartamanofilas()
    {
     //limpiar la tabla
     int numerofilas=this.jtable_modelo.getRowCount();
     for(int i = 0 ;i < numerofilas; i++)
        {
            jtb_comprascatalogo.setRowHeight(i, 30);
        }
    }
private String  fechaeuropea(String fecha) {
       //resibe cadena de fecha en formato americano yyyy-MM-dd
       java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
           try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }

private void guarda_proveedor()
    {
       String arreglo_status[]=this.jcbx_idstatus.getSelectedItem().toString().split(":");
       String arreglo_clasif[]=this.jcbx_clasificacion.getSelectedItem().toString().split(":");
       String arreglo_ctacontrol[]=this.jcbx_ctacontrol.getSelectedItem().toString().split(":");
       String texto="select * from x1distribucion_terminados_proveedores_update(1,'"+this.jtf_provid.getText().toString().toUpperCase()+"','"+this.jtf_provnombre.getText().toString().toUpperCase()+"','"+this.jtf_domcalle.getText().toString().toUpperCase()+"','"+this.jtf_domcolonia.getText().toString().toUpperCase()+"','"+this.jtf_dompobla.getText().toString().toUpperCase()+"','"+this.jtf_domcod.getText().toString().toUpperCase()+"','"+this.jtf_rfc.getText().toString()+"','"+this.jtf_curp.getText().toString().toUpperCase()+"','"+this.jtf_domtelefono.getText().toString().toUpperCase()+"','"+this.jtf_fax.getText().toString().toUpperCase()+"','"+this.jtf_email.getText().toString().toUpperCase()+"','"+arreglo_clasif[0]+"','"+this.jtf_diascredito.getText().toString().toUpperCase()+"','"+this.jtf_limitecredito.getText().toString().toUpperCase()+"','"+this.jtf_porcendescuento.getText().toString().toUpperCase()+"','','','"+this.jtf_inicialarticulos.getText().toString().toUpperCase()+"','"+this.jep_observaciones.getText().toString().toUpperCase()+"','"+this.jtf_termiarti.getText().toString().toUpperCase()+"','"+arreglo_ctacontrol[0]+"','"+this.jtf_idsubfamilia.getText().toString().toUpperCase()+"','"+arreglo_status[0]+"','','"+this.jep_bitacora.getText().toString().toUpperCase()+"')";
       System.out.println(texto);

       String confirma="";
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     confirma=rs.getString(1);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (confirma.equals("1"))
              {
                JOptionPane.showMessageDialog(null,"Gracias datos Actualizados Correctamente", "Sistema Integral Proveedores",1);
              }
         else
              {
                JOptionPane.showMessageDialog(null,"Error Consulte con Su Administrador", "Sistema Integral Proveedores",1);
              }
      }
private void loadcombo2()
    {
     this.jcbx_tiendas1.addItem("0:General");
          try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_tiendas_activas(7,'','') as (tie_descri character varying(35),tie_id integer,tie_desesque character varying(25),idclie character varying(12));",variables_global.getconexiongral());
               while (rs.next())
                    {
                          this.jcbx_tiendas1.addItem(rs.getString("tie_id")+":"+rs.getString("tie_descri")+":"+rs.getString("idclie"));
                    }
            }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

}
private void jtbl_distribucionMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 private void jt_articulosestadisticasMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 private void jt_invextieMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
private void dioclickd(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
         int columna =jtbl_distribucion.getSelectedColumn();
         int folio=0;
         int fila = jtbl_distribucion.getSelectedRow();
         String idcadena=this.jtbl_distribucion.getValueAt(fila, 2).toString();

         try
             {
                rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_codigo_buscasidsieuno('"+idcadena+"') as (idarticulo integer);",variables_global.getconexiongral());
                while (rs.next())
                        {

                            folio=rs.getInt(1);
                            articulos_sie_editar fase=new articulos_sie_editar(String.valueOf(folio));
                            fase.pack();
                            fase.setVisible(true);

                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }

        //setVisible(false);
    }
private void dioclicalmdis(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
         int columna =jtb_almacen_catalogo.getSelectedColumn();
         int folio=0;
         int fila = jtb_almacen_catalogo.getSelectedRow();
         String idcadena=this.jtb_almacen_catalogo.getValueAt(fila, 2).toString();

         try
             {
                rs = x.sieuno_executediversosv2("select * from x1distribucion_terminados_codigo_buscasidsieuno('"+idcadena+"') as (idarticulo integer);",variables_global.getconexiongral());
                while (rs.next())
                        {

                            folio=rs.getInt(1);
                            articulos_sie_editar fase=new articulos_sie_editar(String.valueOf(folio));
                            fase.pack();
                            fase.setVisible(true);

                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }

        //setVisible(false);
    }
private void dioclickdfoto(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int fila = jtbl_distribucion.getSelectedRow();

        this.jtf_fotoidhisdis.setText(jtable_modelo_distribucion.getValueAt(fila, 2).toString());
         this.jep_articuloimagen2.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_distribucion.getValueAt(fila, 2).toString()+".JPG\" width=\"180\" height=\"135\" border=\"0\" alt=\"Foto Articulo\"></img>");
    }
private void dioclicketfoto(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int fila = jt_articulosestadisticas.getSelectedRow();
         this.jtf_fotoidrotarti.setText(jtable_modelo_articyestadis.getValueAt(fila, 4).toString());
         this.jep_articuloimagen3.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_articyestadis.getValueAt(fila, 4).toString()+".JPG\" width=\"180\" height=\"135\" border=\"0\" alt=\"Foto Articulo\"></img>");
     if(JOptionPane.showConfirmDialog(null, "<html><h2>Desea ver Estadisticas?</h2></html>")==0)
            {
                    this.carga_articulo_estadisticas("0",jtable_modelo_articyestadis.getValueAt(fila, 3).toString());
            }
         
    }
private void dioclickfotovye(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int fila = jtb_articmasven.getSelectedRow();

         this.jtf_fotoidmasven.setText(jtable_modelo_amv.getValueAt(fila, 1).toString());
         this.jep_articuloimagen1.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_amv.getValueAt(fila, 1).toString()+".JPG\" width=\"180\" height=\"150\" border=\"0\" alt=\"Foto Articulo\"></img>");
    }
private void dioclickexifop(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int fila = jtb_catalogo_exis.getSelectedRow();
         String id[]=jtable_modelo_existencias.getValueAt(fila, 1).toString().split(":");
         this.jtf_fotoidstocks.setText(jtable_modelo_existencias.getValueAt(fila, 0).toString());
         this.jtf_fotoidstocks1.setText(id[1]);
         this.jep_articuloimagen.setText("<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_existencias.getValueAt(fila, 0).toString()+".JPG\" width=\"180\" height=\"150\" border=\"0\" alt=\"Foto Articulo\"></img>");
         this.carga_articulo_estadisticas("0",id[0]);
    }
 private void find_textoenjtable(int columna,int filainicio,String texto)
    {
       int totalfilasreporte=this.jtable_modelo_distribucion.getRowCount()-3,i=0,encontro=0,coincidencias=0;
       String cadenaobtenida="";
         //genero los totales por tienda
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_distribucion.getValueAt(i, columna).toString();
                encontro=cadenaobtenida.indexOf(texto);
                if(encontro!=-1)
                    {
                        System.out.println(cadenaobtenida+" en pocicion "+i);
                        this.jtbl_distribucion.changeSelection(i, 0, true, false);
                        encontro=-1;
                        coincidencias++;
                    }
            }
            this.jlb_resultado.setText("Resultado:"+this.jtf_buscarenjtable.getText()+"="+coincidencias);
    }
 private void find_textoenjtableamv(int columna,int filainicio,String texto)
    {
       int totalfilasreporte=this.jtable_modelo_amv.getRowCount(),i=0,encontro=0,coincidencias=0;

       String cadenaobtenida="";
         //genero los totales por tienda
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_amv.getValueAt(i, columnaanterior).toString().replace("<html><BODY bgcolor=#CC0066>", "").replace("</BODY></html>","");
                jtable_modelo_amv.setValueAt(cadenaobtenida, i,columnaanterior);
            }
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_amv.getValueAt(i, columna).toString();

                encontro=cadenaobtenida.indexOf(texto);
                if(encontro!=-1)
                    {
                        System.out.println(cadenaobtenida+" en pocicion "+i);
                        this.jtb_articmasven.changeSelection(i, 0, true, false);
                        jtable_modelo_amv.setValueAt("<html><BODY bgcolor=#CC0066>"+cadenaobtenida+"</BODY></html>", i,columna);
                        encontro=-1;
                        coincidencias++;
                    }
            }
       columnaanterior=columna;
            this.jlb_resultado1.setText("Resultado:"+this.jtf_buscarenjtableamv.getText()+"="+coincidencias);
    }
private void find_textoenjtablerot(int columna,int filainicio,String texto)
    {
       int totalfilasreporte=this.jtable_modelo_articyestadis.getRowCount(),i=0,encontro=0,coincidencias=0;

       String cadenaobtenida="";
         //genero los totales por tienda
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_articyestadis.getValueAt(i, columnaanteriorrot).toString().replace("<html><BODY bgcolor=#CC0066>", "").replace("</BODY></html>","");
                jtable_modelo_articyestadis.setValueAt(cadenaobtenida, i,columnaanteriorrot);
            }
       for(i=0;i<totalfilasreporte;i++)
            {
                cadenaobtenida=jtable_modelo_articyestadis.getValueAt(i, columna).toString();
                encontro=cadenaobtenida.indexOf(texto);
                if(encontro!=-1)
                    {
                        System.out.println(cadenaobtenida+" en pocicion "+i);
                        this.jt_articulosestadisticas.changeSelection(i, 0, true, false);
                        jtable_modelo_articyestadis.setValueAt("<html><BODY bgcolor=#CC0066>"+cadenaobtenida+"</BODY></html>", i,columna);
                        encontro=-1;
                        coincidencias++;
                    }
            }
       columnaanteriorrot=columna;
       this.jlb_resultado2.setText("Resultado:"+this.jtf_buscarenjtablerot.getText()+"="+coincidencias);
    }

 private void dioclickinvextie(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

         System.out.println("dio doble  click");

            this.contruir_graficainvextie();
      }
 private void contruir_grafica_distribuciontotal()
    {
        //inicio a extraer los totales del dia sin incluir monedero es decir al reporte detalle corte
        //contruyo el grafico de lineas del cortes del dia detalle
         DefaultCategoryDataset datasetbarra = new DefaultCategoryDataset();
         String titulografico="",totaltiendatexto="",titulopartido[]=null;
         int totalfilasreporte=this.jtable_modelo_distribucion.getRowCount()-3,i=0,ii=0;
         int numerotiendas=this.jtable_modelo_distribucion.getColumnCount()-7;
         float totalve=0;
         for( ii=0;ii<numerotiendas;ii++)
            {
                System.out.println(totalfilasreporte);
                totalve=Float.valueOf(jtable_modelo_distribucion.getValueAt(totalfilasreporte, ii+6).toString().replace(",","").replace(".","").replace("<html><h3><b>","").replace("</b></h3></html>", ""));
                titulografico=jtable_modelo_distribucion.getColumnName(ii+6).replace("<html><b>","").replace("</b></html>","");
                titulopartido=titulografico.split(":");
                if(totalve>0)
                    {
                        datasetbarra.addValue(totalve,ii+":"+titulopartido[1],"Tiendas");
                    }
            }
       //System.out.println("se crea nuevo:");
        graficacion_varios_barras gvbtempo = new graficacion_varios_barras("Sistema Integral: Estadisticas de Distribucion del Proveedor",datasetbarra,"Distribucion Proveedor:"+this.jtf_provnombre.getText(),"Entrada de Piezas");
        gvbtempo.pack();
        RefineryUtilities.centerFrameOnScreen(gvbtempo);
        gvbtempo.setVisible(true);
        //this.jif_graficaarticulos.getParent().add(gvbtempo);
     }

 private void contruir_totales_resumen()
    {
         DecimalFormat myFormatter = new DecimalFormat("###,###,###");
         float totalve=0,totalpiezas=0;
         int totalfilasreporte=this.jtable_modelo_resumen.getRowCount()-2,i=0,ii=0;
         int numerotiendas=this.jtable_modelo_resumen.getColumnCount()-2;
         //genero los totales por tienda

           for(i=0;i<totalfilasreporte;i++)
                  {
                        totalve=0;
                   for( ii=0;ii<numerotiendas;ii++)
                        {
                            totalve+=Float.valueOf(jtable_modelo_resumen.getValueAt(i, ii+1).toString().replace(",","").replace(".",""));
                        }
                        jtable_modelo_resumen.setValueAt("<html><h3><b>"+myFormatter.format(totalve)+"</b></h3></html>",i,ii+1);
                  }
          totalpiezas=Float.valueOf(jtable_modelo_resumen.getValueAt(0, numerotiendas+1).toString().replace(",","").replace(".","").replace("<html><h3><b>", "").replace("</b></h3></html>", ""));
           System.out.println(totalpiezas);
          for( ii=0;ii<numerotiendas;ii++)
                 {
                  totalve=Float.valueOf(jtable_modelo_resumen.getValueAt(0, ii+1).toString().replace(",","").replace(".",""));
                  System.out.println(totalve);
                  jtable_modelo_resumen.setValueAt("<html><h3><b>"+myFormatter.format((totalve/totalpiezas)*100)+"%</b></h3></html>",4,ii+1);
                 }
}

 private void contruir_grafica_distribuciontotalventa()
    {
        //inicio a extraer los totales del dia sin incluir monedero es decir al reporte detalle corte
        //contruyo el grafico de lineas del cortes del dia detalle

         DefaultCategoryDataset datasetbarra = new DefaultCategoryDataset();
         String titulografico="",totaltiendatexto="",titulopartido[]=null;
         int totalfilasreporte=this.jtable_modelo_resumen.getRowCount()-2,i=0,ii=0;
         int numerotiendas=this.jtable_modelo_resumen.getColumnCount()-2;
         float totalve=0;
         for( ii=0;ii<numerotiendas;ii++)
            {
                System.out.println(totalfilasreporte);
                totalve=Float.valueOf(jtable_modelo_resumen.getValueAt(1, ii+1).toString().replace(",","").replace(".","").replace("<html><h3><b>","").replace("</b></h3></html>", ""));

                titulografico=jtable_modelo_resumen.getColumnName(ii+1).replace("<html><b>","").replace("</b></html>","");
                titulopartido=titulografico.split(":");
                if(totalve>0)
                    {
                        datasetbarra.addValue(totalve,ii+":"+titulopartido[1],"Tiendas");
                    }

         }
       //System.out.println("se crea nuevo:");
        graficacion_varios_barras gvbtempo = new graficacion_varios_barras("Sistema Integral: Estadisticas Importe de Ventas",datasetbarra,"Resumen de Ventas X tienda Acumulado","General");
        gvbtempo.pack();
        RefineryUtilities.centerFrameOnScreen(gvbtempo);
        gvbtempo.setVisible(true);
        //this.jif_graficaarticulos.getParent().add(gvbtempo);
     }
 private void contruir_graficainvextie()
    {
        //inicio a extraer los totales del dia sin incluir monedero es decir al reporte detalle corte
        //contruyo el grafico de lineas del cortes del dia detalle

         DefaultCategoryDataset datasetbarra = new DefaultCategoryDataset();
         String titulografico="",totaltiendatexto="";
         int totalfilasreporte=this.jtable_modelo_invextie.getRowCount()-2,i=0,ii=0;
         int numerotiendas=this.jtable_tiendas.getRowCount();

         for(i=0;i<totalfilasreporte;i++)
         {
             for(ii=0;ii<numerotiendas;ii++)
                  {
                   totaltiendatexto = jtable_modelo_invextie.getValueAt(i+1, ii+1).toString();
                   titulografico=jtable_modelo_invextie.getValueAt(i+1, 0).toString().replace("</b></h4></html>","").replace("<html><h4><b>","");
                   datasetbarra.addValue(Float.valueOf(totaltiendatexto.replace(",","").replace(".","")),titulografico,jtable_tiendas.getValueAt(ii, 0).toString());
                  }
         }
        System.out.println("se crea nuevo:");
        graficacion_varios_barras gvbinvxtie = new graficacion_varios_barras("Sistema Integral: Estadisticas proveedor Inventarios X tienda",datasetbarra,"Detalle Inventarios x Tienda:"+this.jtf_provnombre.getText(),"Tienda");
        gvbinvxtie.pack();
        RefineryUtilities.centerFrameOnScreen(gvbinvxtie);
        gvbinvxtie.setVisible(true);

     }
private void dioclickedit(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");

         int fila = jt_articulosestadisticas.getSelectedRow();
         Object valor = jt_articulosestadisticas.getValueAt(fila, 3);

        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        articulos_sie_editar fase=new articulos_sie_editar(valor.toString().replace("<html><BODY bgcolor=#CC0066>", "").replace("</BODY></html>",""));
        fase.pack();
        fase.setVisible(true);

        //setVisible(false);
    }
private void dioclickamv(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jtb_articmasven.getSelectedRow();
         Object valor = jtb_articmasven.getValueAt(fila, 10);

        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        articulos_sie_editar fase=new articulos_sie_editar(valor.toString().replace("<html><BODY bgcolor=#CC0066>", "").replace("</BODY></html>",""));
        fase.pack();
        fase.setVisible(true);
        //setVisible(false);
}
private void verfotosestereporteamv()
    {
     this.cambiartamanofilas();
     int numerofilas=this.jtable_modelo_amv.getRowCount();
             for(int i = 0 ;i < numerofilas; i++)
                {
                      jtable_modelo_amv.setValueAt("<html><head></head><body><p style=\"margin-top: 0\"><img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_amv.getValueAt(i, 1).toString()+".JPG\" width=\"90\" height=\"60\" border=\"0\" alt=\"Foto\"></img></p></body></html>", i,9);
                      jtb_articmasven.setRowHeight(i, 70);
                }

    }
  private void quitarfotosestereporteamv()
    {
     int numerofilas=this.jtable_modelo_amv.getRowCount();

             for(int i = 0 ;i < numerofilas; i++)
                {
                      jtable_modelo_amv.setValueAt("", i,9);
                      jtb_articmasven.setRowHeight(i, 15);
                }
    }
 private void loadcombo()
    {
     this.jcbx_tiendas.addItem("0:General");
          try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_tiendas_activas(3,'','') as (tie_descri character varying(35),tie_id integer,tie_desesque character varying(25),idclie character varying(12));",variables_global.getconexiongral());
               while (rs.next())
                    {
                          this.jcbx_tiendas.addItem(rs.getString("tie_id")+":"+rs.getString("tie_descri")+":"+rs.getString("idclie"));
                    }
            }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
        try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_tiendas_activas(4,'','') as (tie_descri character varying(35),tie_id integer,tie_desesque character varying(25),idclie character varying(12));",variables_global.getconexiongral());
               while (rs.next())
                    {
                          this.jcbx_tiendas.addItem(rs.getString("tie_id")+":"+rs.getString("tie_descri")+":"+rs.getString("idclie"));
                    }
            }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }}


 private void carga_datos_compras_xtienda(int opcion,String tie,String viaje,String idtienda,String fechai,String fechaf)
    {
        //fecha es la final del reporte
        DecimalFormat miformat = new DecimalFormat("############.####");
        //indicamos 7 columnas
        SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");
        while(jtable_modelo_comxfam_detpro_artis.getRowCount()>0)jtable_modelo_comxfam_detpro_artis.removeRow(0);
        double importe=0,totalpiezas=0,totcosto=0,pzascom=0,costocom=0,rotacion=0;
        Object[] fnewRow = new Object[15];
        String idpro="",textosql="select * from x1distribucion_terminados_compras_detalle_rotacion("+opcion+",'"+tie+"','"+viaje+"','') as (idarticulo character varying(16),canarti numeric,costoarti numeric,costoartii numeric,precioarti numeric,famdescrip character varying(40),proveedescrip character varying(60),descripcion character varying(80));";
        //Voy por la venta del dia
        //serie1 = this.fechaeuropea(fechai)+" AL "+this.fechaeuropea(fecha);//fecha final de reporte
        System.out.println(textosql);
               try{
                 //rs = x.sieuno_ventas_cortedia(tienda,pFecha,i);
                 rs=x.sieuno_executediversosv2(textosql,variables_global.getconexiongral());
                 while (rs.next())
                        {
                               fnewRow[0]=rs.getString("famdescrip");
                               fnewRow[1]=rs.getString("proveedescrip")+"";
                               fnewRow[2]=rs.getString("idarticulo");
                               fnewRow[3]=rs.getString("descripcion");
                               fnewRow[4]=miformat.format(rs.getDouble("costoartii")/rs.getDouble("canarti"));
                               fnewRow[5]=miformat.format(rs.getDouble("precioarti")/rs.getDouble("canarti"));
                               fnewRow[6]=miformat.format(rs.getDouble("canarti"));
                               fnewRow[7]=miformat.format(rs.getDouble("costoarti"));
                               fnewRow[8]=miformat.format(rs.getDouble("costoartii"));
                               fnewRow[9]=miformat.format(rs.getDouble("precioarti"));
                               fnewRow[10]="0";
                               fnewRow[11]="0";
                               fnewRow[12]="0";
                               fnewRow[13]="0";
                               fnewRow[14]="0";
                               pzascom+=rs.getFloat("canarti");
                               costocom+=rs.getFloat("costoarti");
                               totcosto+=rs.getFloat("costoartii");
                               importe+=rs.getFloat("precioarti");
                               jtable_modelo_comxfam_detpro_artis.addRow(fnewRow);

                        }
                    }
                     catch(Exception e)
                     {
                             System.out.println(e.getMessage());
                     }
            //jtable_modelo_comxfam_detpro_artis.addRow(new Object[]{"","<html><h3><b>Totales: </b></h3></html>","<html><h3><b>"+miformat.format(pzascom)+"</b></h3></html>","<html><h3><b>"+miformat.format(costocom)+"</b></h3></html>","<html><h3><b>"+miformat.format(totalpiezas)+"</b></h3></html>","<html><h3><b>"+miformat.format(totcosto)+"</b></h3></html>","<html><h3><b>"+miformat.format(importe)+"</b></h3></html>",miformat.format((totcosto/costocom)*100)+"%"});
                               fnewRow[0]="";
                               fnewRow[1]="";
                               fnewRow[2]="";
                               fnewRow[3]="<html><h3><b>"+"Totales"+"</b></h3></html>";
                               fnewRow[4]="";
                               fnewRow[5]="";
                               fnewRow[6]="<html><h3><b>"+miformat.format(pzascom)+"</b></h3></html>";
                               fnewRow[7]="<html><h3><b>"+miformat.format(costocom)+"</b></h3></html>";
                               fnewRow[8]="<html><h3><b>"+miformat.format(totcosto)+"</b></h3></html>";
                               fnewRow[9]="<html><h3><b>"+miformat.format(importe)+"</b></h3></html>";
                               fnewRow[10]="0";
                               fnewRow[11]="0";
                               fnewRow[12]="0";
                               fnewRow[13]="0";
                               fnewRow[14]="0";
                               jtable_modelo_comxfam_detpro_artis.addRow(fnewRow);
                               //this.centrar_datos();

//****************************************************************voy por ventas
    int numerofilas = this.jtable_modelo_comxfam_detpro_artis.getRowCount(),ii=0;
    String selectin="";
        for( ii=0;ii<numerofilas;ii++)
                {
                if (ii>0)
                    {
                        selectin+=".";
                    }
                selectin+=""+jtable_modelo_comxfam_detpro_artis.getValueAt(ii ,2)+"";
                }

    System.out.println(selectin);

        String    texto="select * from x1sieuno_articulo_masvendidosv4(5,0,'"+idtienda+"','"+fechai+"','"+fechaf+"','"+selectin+"','') as (id integer, can real,importe double precision,clavepro character varying(16));";
        System.out.println(texto);
            try
                {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {
                        this.crea_hoja_agregaexistencias2(rs.getString("clavepro"),rs.getString("can"),1,miformat.format(rs.getDouble("importe")),"");
                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }

             texto="select * from x1sieuno_articulo_detalle(7,"+idtienda+",'','"+selectin+"') as (clavepro character varying(16),exi numeric,exit numeric)";
        System.out.println(texto);
            try
                {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {
                        this.crea_hoja_agregaexistencias2(rs.getString("clavepro"),rs.getString("exi"),2,rs.getString("exit"),"");
                    }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }
 }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jtf_provid = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jtf_provnombre = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jtf_domcalle = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jtf_domcolonia = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jtf_dompobla = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jtf_domcod = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jtf_domtelefono = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jtf_email = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jtf_rfc = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtf_fax = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jcbx_clasificacion = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        jcbx_ctacontrol = new javax.swing.JComboBox();
        jtf_diascredito = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jtf_limitecredito = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jtf_porcendescuento = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jtf_fultcompra = new javax.swing.JTextField();
        jtf_fultpago = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jtf_inicialarticulos = new javax.swing.JTextField();
        jtf_termiarti = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jtf_idsubfamilia = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        jtf_acumuladocomp = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jep_observaciones = new javax.swing.JEditorPane();
        jLabel22 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jep_bitacora = new javax.swing.JEditorPane();
        jButton1 = new javax.swing.JButton();
        jchbx_agregarsieuno = new javax.swing.JCheckBox();
        jcbx_idstatus = new javax.swing.JComboBox();
        jbtn_guardar = new javax.swing.JButton();
        jtf_curp = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jPanel26 = new javax.swing.JPanel();
        jtf_idprovnuevo = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtb_comprascatalogo = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        };
        jPanel5 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jrbtn_columnaclave = new javax.swing.JRadioButton();
        jrbtn_item = new javax.swing.JRadioButton();
        jLabel26 = new javax.swing.JLabel();
        jtf_buscarenjtable = new javax.swing.JTextField();
        jlb_resultado = new javax.swing.JLabel();
        jchk_graficadistribucion = new javax.swing.JCheckBox();
        jPanel18 = new javax.swing.JPanel();
        jScrollPane13 = new javax.swing.JScrollPane();
        jep_articuloimagen2 = new javax.swing.JEditorPane();
        jbtn_imagenfull3 = new javax.swing.JButton();
        jtf_fotoidhisdis = new javax.swing.JTextField();
        jPanel19 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jtbl_distribucion = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }}
            ;
            jPanel6 = new javax.swing.JPanel();
            jPanel7 = new javax.swing.JPanel();
            jScrollPane5 = new javax.swing.JScrollPane();
            jt_ventasmensuales = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jCheckBox1 = new javax.swing.JCheckBox();
            jCheckBox2 = new javax.swing.JCheckBox();
            jCheckBox3 = new javax.swing.JCheckBox();
            jPanel8 = new javax.swing.JPanel();
            jPanel9 = new javax.swing.JPanel();
            jScrollPane6 = new javax.swing.JScrollPane();
            jt_articulosestadisticas = new javax.swing.JTable()
            {
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }
            }
            ;
            jPanel17 = new javax.swing.JPanel();
            jScrollPane17 = new javax.swing.JScrollPane();
            jep_articuloimagen3 = new javax.swing.JEditorPane();
            jbtn_imagenfull4 = new javax.swing.JButton();
            jrbn_repguar = new javax.swing.JRadioButton();
            jrbn_repcontruye = new javax.swing.JRadioButton();
            jtf_fotoidrotarti = new javax.swing.JTextField();
            jrbtn_columnaclaverot = new javax.swing.JRadioButton();
            jRadioButtonrot = new javax.swing.JRadioButton();
            jrbtn_itemrot = new javax.swing.JRadioButton();
            jrbtn_linearot = new javax.swing.JRadioButton();
            jrbtn_temporadarot = new javax.swing.JRadioButton();
            jLabel39 = new javax.swing.JLabel();
            jtf_buscarenjtablerot = new javax.swing.JTextField();
            jlb_resultado2 = new javax.swing.JLabel();
            jPanel24 = new javax.swing.JPanel();
            jScrollPane16 = new javax.swing.JScrollPane();
            jtbl_estadisticasarticulo1 = new javax.swing.JTable(){
                public boolean isCellEditable(int rowIndex, int mColIndex) {
                    return false;
                }}
                ;
                jPanel10 = new javax.swing.JPanel();
                jp_invxtienda = new javax.swing.JPanel();
                jScrollPane7 = new javax.swing.JScrollPane();
                jt_invextie = new javax.swing.JTable()
                {
                    public boolean isCellEditable(int rowIndex, int mColIndex) {
                        return false;
                    }}

                    ;
                    jPanel13 = new javax.swing.JPanel();
                    jScrollPane9 = new javax.swing.JScrollPane();
                    jtb_almacen_catalogo = new javax.swing.JTable()
                    {
                        public boolean isCellEditable(int rowIndex, int mColIndex) {
                            return false;
                        }
                    }
                    ;
                    jlbl_textobuscado = new javax.swing.JLabel();
                    jLabel34 = new javax.swing.JLabel();
                    jlbl_cantidadregistros1 = new javax.swing.JLabel();
                    jLabel35 = new javax.swing.JLabel();
                    jLabel36 = new javax.swing.JLabel();
                    jckbx_veralmacen = new javax.swing.JCheckBox();
                    jPanel11 = new javax.swing.JPanel();
                    jPanel12 = new javax.swing.JPanel();
                    jScrollPane8 = new javax.swing.JScrollPane();
                    jtb_articmasven = new javax.swing.JTable()
                    {
                        public boolean isCellEditable(int rowIndex, int mColIndex) {
                            return false;
                        }}
                        ;
                        jPanel22 = new javax.swing.JPanel();
                        jLabel27 = new javax.swing.JLabel();
                        jlbl_cantidadregistros = new javax.swing.JLabel();
                        jLabel28 = new javax.swing.JLabel();
                        jLabel29 = new javax.swing.JLabel();
                        jdc_fechainicial = new com.toedter.calendar.JDateChooser();
                        jLabel30 = new javax.swing.JLabel();
                        jdc_fechafinal = new com.toedter.calendar.JDateChooser();
                        jbtn_generareporte = new javax.swing.JButton();
                        jcb_verfotos1 = new javax.swing.JCheckBox();
                        jLabel32 = new javax.swing.JLabel();
                        jrbtn_columnaclave1 = new javax.swing.JRadioButton();
                        jRadioButton1 = new javax.swing.JRadioButton();
                        jrbtn_item1 = new javax.swing.JRadioButton();
                        jrbtn_linea = new javax.swing.JRadioButton();
                        jrbtn_linea1 = new javax.swing.JRadioButton();
                        jLabel31 = new javax.swing.JLabel();
                        jtf_buscarenjtableamv = new javax.swing.JTextField();
                        jlb_resultado1 = new javax.swing.JLabel();
                        jScrollPane12 = new javax.swing.JScrollPane();
                        jep_articuloimagen1 = new javax.swing.JEditorPane();
                        jtf_fotoidmasven = new javax.swing.JTextField();
                        jbtn_imagenfull5 = new javax.swing.JButton();
                        jcbx_tiendas = new javax.swing.JComboBox();
                        jPanel14 = new javax.swing.JPanel();
                        jPanel15 = new javax.swing.JPanel();
                        jScrollPane10 = new javax.swing.JScrollPane();
                        jt_comprasxmes = new javax.swing.JTable(){
                            public boolean isCellEditable(int rowIndex, int mColIndex) {
                                return false;
                            }}

                            ;
                            jPanel25 = new javax.swing.JPanel();
                            jScrollPane18 = new javax.swing.JScrollPane();
                            jtb_comxfam_detalleprov_artis = new javax.swing.JTable(){
                                public boolean isCellEditable(int rowIndex, int mColIndex) {
                                    return false;
                                }}
                                ;
                                ;
                                jLabel33 = new javax.swing.JLabel();
                                jdc_fechainicial1 = new com.toedter.calendar.JDateChooser();
                                jLabel37 = new javax.swing.JLabel();
                                jdc_fechafinal1 = new com.toedter.calendar.JDateChooser();
                                jcbx_tiendas1 = new javax.swing.JComboBox();
                                jbtn_generareporte1 = new javax.swing.JButton();
                                jPanel3 = new javax.swing.JPanel();
                                jPanel16 = new javax.swing.JPanel();
                                jPanel20 = new javax.swing.JPanel();
                                jScrollPane11 = new javax.swing.JScrollPane();
                                jtb_catalogo_exis = new javax.swing.JTable(){
                                    public boolean isCellEditable(int rowIndex, int mColIndex) {
                                        return false;
                                    }}
                                    ;
                                    jPanel21 = new javax.swing.JPanel();
                                    jScrollPane14 = new javax.swing.JScrollPane();
                                    jep_articuloimagen = new javax.swing.JEditorPane();
                                    jbtn_imagenfull6 = new javax.swing.JButton();
                                    jtf_fotoidstocks = new javax.swing.JTextField();
                                    jchbx_verexistencias = new javax.swing.JCheckBox();
                                    jtf_fotoidstocks1 = new javax.swing.JTextField();
                                    jtf_fotoidstocks2 = new javax.swing.JTextField();
                                    jPanel23 = new javax.swing.JPanel();
                                    jScrollPane15 = new javax.swing.JScrollPane();
                                    jtbl_estadisticasarticulo = new javax.swing.JTable(){
                                        public boolean isCellEditable(int rowIndex, int mColIndex) {
                                            return false;
                                        }}
                                        ;
                                        jMenuBar1 = new javax.swing.JMenuBar();
                                        jMenu1 = new javax.swing.JMenu();
                                        jmni_salir = new javax.swing.JMenuItem();
                                        jMenu2 = new javax.swing.JMenu();
                                        jmni_escape = new javax.swing.JMenuItem();
                                        jmni_iraingresatexto = new javax.swing.JMenuItem();
                                        jMenuItem1 = new javax.swing.JMenuItem();

                                        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
                                        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(com_distri_compras_proveedores_edita.class);
                                        setTitle(resourceMap.getString("Form.title")); // NOI18N
                                        setName("Form"); // NOI18N

                                        jTabbedPane1.setName("jTabbedPane1"); // NOI18N
                                        jTabbedPane1.setPreferredSize(new java.awt.Dimension(900, 587));
                                        jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
                                            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                                                jTabbedPane1StateChanged(evt);
                                            }
                                        });

                                        jPanel1.setName("jPanel1"); // NOI18N

                                        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
                                        jLabel3.setName("jLabel3"); // NOI18N

                                        jtf_provid.setEditable(false);
                                        jtf_provid.setName("jtf_provid"); // NOI18N

                                        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
                                        jLabel4.setName("jLabel4"); // NOI18N

                                        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
                                        jLabel5.setName("jLabel5"); // NOI18N

                                        jtf_provnombre.setToolTipText(resourceMap.getString("jtf_provnombre.toolTipText")); // NOI18N
                                        jtf_provnombre.setName("jtf_provnombre"); // NOI18N
                                        jtf_provnombre.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_provnombreActionPerformed(evt);
                                            }
                                        });

                                        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
                                        jLabel8.setName("jLabel8"); // NOI18N

                                        jtf_domcalle.setName("jtf_domcalle"); // NOI18N
                                        jtf_domcalle.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_domcalleActionPerformed(evt);
                                            }
                                        });

                                        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
                                        jLabel9.setName("jLabel9"); // NOI18N

                                        jtf_domcolonia.setName("jtf_domcolonia"); // NOI18N
                                        jtf_domcolonia.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_domcoloniaActionPerformed(evt);
                                            }
                                        });

                                        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
                                        jLabel10.setName("jLabel10"); // NOI18N

                                        jtf_dompobla.setName("jtf_dompobla"); // NOI18N
                                        jtf_dompobla.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_dompoblaActionPerformed(evt);
                                            }
                                        });

                                        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
                                        jLabel11.setName("jLabel11"); // NOI18N

                                        jtf_domcod.setName("jtf_domcod"); // NOI18N
                                        jtf_domcod.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_domcodActionPerformed(evt);
                                            }
                                        });

                                        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
                                        jLabel12.setName("jLabel12"); // NOI18N

                                        jtf_domtelefono.setName("jtf_domtelefono"); // NOI18N
                                        jtf_domtelefono.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_domtelefonoActionPerformed(evt);
                                            }
                                        });

                                        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
                                        jLabel23.setName("jLabel23"); // NOI18N

                                        jtf_email.setName("jtf_email"); // NOI18N
                                        jtf_email.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_emailActionPerformed(evt);
                                            }
                                        });

                                        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
                                        jLabel1.setName("jLabel1"); // NOI18N

                                        jtf_rfc.setText(resourceMap.getString("jtf_rfc.text")); // NOI18N
                                        jtf_rfc.setName("jtf_rfc"); // NOI18N

                                        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
                                        jLabel2.setName("jLabel2"); // NOI18N

                                        jtf_fax.setText(resourceMap.getString("jtf_fax.text")); // NOI18N
                                        jtf_fax.setName("jtf_fax"); // NOI18N

                                        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
                                        jLabel6.setName("jLabel6"); // NOI18N

                                        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
                                        jLabel7.setName("jLabel7"); // NOI18N

                                        jcbx_clasificacion.setName("jcbx_clasificacion"); // NOI18N

                                        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
                                        jLabel13.setName("jLabel13"); // NOI18N

                                        jcbx_ctacontrol.setName("jcbx_ctacontrol"); // NOI18N

                                        jtf_diascredito.setText(resourceMap.getString("jtf_diascredito.text")); // NOI18N
                                        jtf_diascredito.setName("jtf_diascredito"); // NOI18N

                                        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
                                        jLabel14.setName("jLabel14"); // NOI18N

                                        jtf_limitecredito.setText(resourceMap.getString("jtf_limitecredito.text")); // NOI18N
                                        jtf_limitecredito.setName("jtf_limitecredito"); // NOI18N

                                        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
                                        jLabel15.setName("jLabel15"); // NOI18N

                                        jtf_porcendescuento.setText(resourceMap.getString("jtf_porcendescuento.text")); // NOI18N
                                        jtf_porcendescuento.setName("jtf_porcendescuento"); // NOI18N

                                        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
                                        jLabel16.setName("jLabel16"); // NOI18N

                                        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
                                        jLabel17.setName("jLabel17"); // NOI18N

                                        jtf_fultcompra.setEditable(false);
                                        jtf_fultcompra.setText(resourceMap.getString("jtf_fultcompra.text")); // NOI18N
                                        jtf_fultcompra.setName("jtf_fultcompra"); // NOI18N

                                        jtf_fultpago.setEditable(false);
                                        jtf_fultpago.setText(resourceMap.getString("jtf_fultpago.text")); // NOI18N
                                        jtf_fultpago.setName("jtf_fultpago"); // NOI18N

                                        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
                                        jLabel18.setName("jLabel18"); // NOI18N

                                        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
                                        jLabel19.setName("jLabel19"); // NOI18N

                                        jtf_inicialarticulos.setText(resourceMap.getString("jtf_inicialarticulos.text")); // NOI18N
                                        jtf_inicialarticulos.setName("jtf_inicialarticulos"); // NOI18N

                                        jtf_termiarti.setText(resourceMap.getString("jtf_termiarti.text")); // NOI18N
                                        jtf_termiarti.setName("jtf_termiarti"); // NOI18N

                                        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
                                        jLabel20.setName("jLabel20"); // NOI18N

                                        jtf_idsubfamilia.setText(resourceMap.getString("jtf_idsubfamilia.text")); // NOI18N
                                        jtf_idsubfamilia.setName("jtf_idsubfamilia"); // NOI18N

                                        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
                                        jLabel21.setName("jLabel21"); // NOI18N

                                        jtf_acumuladocomp.setEditable(false);
                                        jtf_acumuladocomp.setText(resourceMap.getString("jtf_acumuladocomp.text")); // NOI18N
                                        jtf_acumuladocomp.setName("jtf_acumuladocomp"); // NOI18N

                                        jScrollPane1.setName("jScrollPane1"); // NOI18N

                                        jep_observaciones.setContentType(resourceMap.getString("jep_observaciones.contentType")); // NOI18N
                                        jep_observaciones.setName("jep_observaciones"); // NOI18N
                                        jScrollPane1.setViewportView(jep_observaciones);

                                        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
                                        jLabel22.setName("jLabel22"); // NOI18N

                                        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
                                        jLabel24.setName("jLabel24"); // NOI18N

                                        jScrollPane2.setName("jScrollPane2"); // NOI18N

                                        jep_bitacora.setContentType(resourceMap.getString("jep_bitacora.contentType")); // NOI18N
                                        jep_bitacora.setEditable(false);
                                        jep_bitacora.setName("jep_bitacora"); // NOI18N
                                        jScrollPane2.setViewportView(jep_bitacora);

                                        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
                                        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
                                        jButton1.setName("jButton1"); // NOI18N
                                        jButton1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jButton1ActionPerformed(evt);
                                            }
                                        });

                                        jchbx_agregarsieuno.setText(resourceMap.getString("jchbx_agregarsieuno.text")); // NOI18N
                                        jchbx_agregarsieuno.setName("jchbx_agregarsieuno"); // NOI18N
                                        jchbx_agregarsieuno.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jchbx_agregarsieunoActionPerformed(evt);
                                            }
                                        });

                                        jcbx_idstatus.setName("jcbx_idstatus"); // NOI18N

                                        jbtn_guardar.setIcon(resourceMap.getIcon("jbtn_guardar.icon")); // NOI18N
                                        jbtn_guardar.setText(resourceMap.getString("jbtn_guardar.text")); // NOI18N
                                        jbtn_guardar.setName("jbtn_guardar"); // NOI18N
                                        jbtn_guardar.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_guardarActionPerformed(evt);
                                            }
                                        });

                                        jtf_curp.setName("jtf_curp"); // NOI18N
                                        jtf_curp.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_curpActionPerformed(evt);
                                            }
                                        });

                                        jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
                                        jLabel40.setName("jLabel40"); // NOI18N

                                        jPanel26.setName("jPanel26"); // NOI18N

                                        jtf_idprovnuevo.setName("jtf_idprovnuevo"); // NOI18N
                                        jtf_idprovnuevo.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_idprovnuevoActionPerformed(evt);
                                            }
                                        });

                                        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
                                        jPanel26.setLayout(jPanel26Layout);
                                        jPanel26Layout.setHorizontalGroup(
                                            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel26Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addComponent(jtf_idprovnuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(66, Short.MAX_VALUE))
                                        );
                                        jPanel26Layout.setVerticalGroup(
                                            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel26Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addComponent(jtf_idprovnuevo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(75, Short.MAX_VALUE))
                                        );

                                        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
                                        jPanel1.setLayout(jPanel1Layout);
                                        jPanel1Layout.setHorizontalGroup(
                                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                        .addComponent(jLabel6)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_diascredito, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jLabel14)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_limitecredito, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jLabel15)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_porcendescuento, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jLabel21)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_acumuladocomp, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE))
                                                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                                            .addComponent(jLabel8)
                                                                            .addComponent(jLabel9)
                                                                            .addComponent(jLabel10)
                                                                            .addComponent(jLabel1)
                                                                            .addComponent(jLabel2)
                                                                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                            .addComponent(jLabel3))
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                                                    .addComponent(jcbx_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                        .addComponent(jtf_provid, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                        .addGap(18, 18, 18)
                                                                                        .addComponent(jLabel5)))
                                                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                        .addComponent(jtf_provnombre, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE))
                                                                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                                        .addGap(29, 29, 29)
                                                                                        .addComponent(jLabel7)
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                        .addComponent(jcbx_clasificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                                                            .addComponent(jtf_domcalle, javax.swing.GroupLayout.PREFERRED_SIZE, 315, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                                                            .addComponent(jtf_dompobla, javax.swing.GroupLayout.Alignment.LEADING)
                                                                                            .addComponent(jtf_domcolonia, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                                        .addGap(18, 18, 18))
                                                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                                .addComponent(jtf_fax, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                                                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                                                .addComponent(jLabel23))
                                                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                                .addComponent(jtf_rfc)
                                                                                                .addGap(50, 50, 50)))
                                                                                        .addGap(8, 8, 8)))
                                                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                        .addComponent(jLabel11)
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                        .addComponent(jtf_domcod, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                        .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                                                                                        .addComponent(jtf_curp, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                        .addComponent(jLabel12)
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                                        .addComponent(jtf_domtelefono, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE))
                                                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                        .addComponent(jtf_email, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE))))))
                                                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                                        .addComponent(jLabel18)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_inicialarticulos, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jLabel19)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_termiarti, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jLabel20)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addComponent(jtf_idsubfamilia, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                            .addComponent(jchbx_agregarsieuno, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                                            .addComponent(jPanel26, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                                                                .addGroup(jPanel1Layout.createSequentialGroup()
                                                                    .addComponent(jLabel16)
                                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                    .addComponent(jtf_fultcompra, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                    .addGap(18, 18, 18)
                                                                    .addComponent(jLabel17)
                                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                    .addComponent(jtf_fultpago, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                    .addGap(194, 194, 194))
                                                                .addComponent(jLabel22))
                                                            .addGap(28, 28, 28))
                                                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                        .addComponent(jbtn_guardar)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jLabel24)
                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                        .addComponent(jLabel13)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jcbx_ctacontrol, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGap(190, 190, 190))
                                        );
                                        jPanel1Layout.setVerticalGroup(
                                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel13)
                                                    .addComponent(jcbx_ctacontrol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel4)
                                                    .addComponent(jcbx_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel7)
                                                    .addComponent(jcbx_clasificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                        .addGap(23, 23, 23)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jtf_provnombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel24)))
                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel3)
                                                            .addComponent(jtf_provid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel5))))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel8)
                                                            .addComponent(jtf_domcalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel9)
                                                            .addComponent(jtf_domcolonia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel10)
                                                            .addComponent(jtf_dompobla, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel11)
                                                            .addComponent(jtf_domcod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jtf_curp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel40))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jtf_domtelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel1)
                                                            .addComponent(jtf_rfc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel12))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jtf_email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel23)
                                                            .addComponent(jLabel2)
                                                            .addComponent(jtf_fax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel6)
                                                            .addComponent(jtf_diascredito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel14)
                                                            .addComponent(jtf_limitecredito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel15)
                                                            .addComponent(jtf_porcendescuento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel21)
                                                            .addComponent(jtf_acumuladocomp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel16)
                                                            .addComponent(jLabel17)
                                                            .addComponent(jtf_fultcompra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jtf_fultpago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel18)
                                                            .addComponent(jLabel19)
                                                            .addComponent(jtf_inicialarticulos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jtf_termiarti, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel20)
                                                            .addComponent(jtf_idsubfamilia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jButton1))
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                .addGap(30, 30, 30)
                                                                .addComponent(jLabel22))
                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                .addComponent(jchbx_agregarsieuno)))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                .addComponent(jbtn_guardar)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE))
                                                            .addComponent(jPanel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE))
                                                .addGap(20, 20, 20))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

                                        jPanel2.setName("jPanel2"); // NOI18N

                                        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
                                        jPanel4.setName("jPanel4"); // NOI18N

                                        jScrollPane3.setName("jScrollPane3"); // NOI18N

                                        jtb_comprascatalogo.setModel(this.jtable_modelo);
                                        jtb_comprascatalogo.setName("jtb_comprascatalogo"); // NOI18N
                                        jtb_comprascatalogo.setRowHeight(22);
                                        jtb_comprascatalogo.getTableHeader().setReorderingAllowed(false);
                                        jtb_comprascatalogo.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jtb_comprascatalogoMouseClicked(evt);
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclick(evt);
                                                }
                                            }
                                        });
                                        jScrollPane3.setViewportView(jtb_comprascatalogo);

                                        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
                                        jPanel4.setLayout(jPanel4Layout);
                                        jPanel4Layout.setHorizontalGroup(
                                            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1057, Short.MAX_VALUE)
                                        );
                                        jPanel4Layout.setVerticalGroup(
                                            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 476, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        );

                                        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
                                        jPanel2.setLayout(jPanel2Layout);
                                        jPanel2Layout.setHorizontalGroup(
                                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        );
                                        jPanel2Layout.setVerticalGroup(
                                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel2Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(30, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

                                        jPanel5.setName("jPanel5"); // NOI18N

                                        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
                                        jLabel25.setName("jLabel25"); // NOI18N

                                        buttonGroup1.add(jrbtn_columnaclave);
                                        jrbtn_columnaclave.setText(resourceMap.getString("jrbtn_columnaclave.text")); // NOI18N
                                        jrbtn_columnaclave.setActionCommand(resourceMap.getString("jrbtn_columnaclave.actionCommand")); // NOI18N
                                        jrbtn_columnaclave.setName("jrbtn_columnaclave"); // NOI18N
                                        jrbtn_columnaclave.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_columnaclaveActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup1.add(jrbtn_item);
                                        jrbtn_item.setText(resourceMap.getString("jrbtn_item.text")); // NOI18N
                                        jrbtn_item.setActionCommand(resourceMap.getString("jrbtn_item.actionCommand")); // NOI18N
                                        jrbtn_item.setName("jrbtn_item"); // NOI18N
                                        jrbtn_item.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_itemActionPerformed(evt);
                                            }
                                        });

                                        jLabel26.setFont(resourceMap.getFont("jLabel26.font")); // NOI18N
                                        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
                                        jLabel26.setName("jLabel26"); // NOI18N

                                        jtf_buscarenjtable.setName("jtf_buscarenjtable"); // NOI18N
                                        jtf_buscarenjtable.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_buscarenjtableActionPerformed(evt);
                                            }
                                        });

                                        jlb_resultado.setFont(resourceMap.getFont("jlb_resultado.font")); // NOI18N
                                        jlb_resultado.setText(resourceMap.getString("jlb_resultado.text")); // NOI18N
                                        jlb_resultado.setName("jlb_resultado"); // NOI18N

                                        jchk_graficadistribucion.setText(resourceMap.getString("jchk_graficadistribucion.text")); // NOI18N
                                        jchk_graficadistribucion.setName("jchk_graficadistribucion"); // NOI18N
                                        jchk_graficadistribucion.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jchk_graficadistribucionActionPerformed(evt);
                                            }
                                        });

                                        jPanel18.setName("jPanel18"); // NOI18N

                                        jScrollPane13.setName("jScrollPane13"); // NOI18N

                                        jep_articuloimagen2.setContentType(resourceMap.getString("jep_articuloimagen2.contentType")); // NOI18N
                                        jep_articuloimagen2.setName("jep_articuloimagen2"); // NOI18N
                                        jScrollPane13.setViewportView(jep_articuloimagen2);

                                        jbtn_imagenfull3.setFont(resourceMap.getFont("jbtn_imagenfull3.font")); // NOI18N
                                        jbtn_imagenfull3.setIcon(resourceMap.getIcon("jbtn_imagenfull3.icon")); // NOI18N
                                        jbtn_imagenfull3.setText(resourceMap.getString("jbtn_imagenfull3.text")); // NOI18N
                                        jbtn_imagenfull3.setToolTipText(resourceMap.getString("jbtn_imagenfull3.toolTipText")); // NOI18N
                                        jbtn_imagenfull3.setName("jbtn_imagenfull3"); // NOI18N
                                        jbtn_imagenfull3.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_imagenfull3ActionPerformed(evt);
                                            }
                                        });

                                        jtf_fotoidhisdis.setFont(resourceMap.getFont("jtf_fotoidhisdis.font")); // NOI18N
                                        jtf_fotoidhisdis.setName("jtf_fotoidhisdis"); // NOI18N

                                        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
                                        jPanel18.setLayout(jPanel18Layout);
                                        jPanel18Layout.setHorizontalGroup(
                                            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel18Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jbtn_imagenfull3)
                                                    .addComponent(jtf_fotoidhisdis, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addContainerGap(18, Short.MAX_VALUE))
                                        );
                                        jPanel18Layout.setVerticalGroup(
                                            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel18Layout.createSequentialGroup()
                                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(jPanel18Layout.createSequentialGroup()
                                                        .addContainerGap()
                                                        .addComponent(jbtn_imagenfull3)
                                                        .addGap(31, 31, 31)
                                                        .addComponent(jtf_fotoidhisdis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        );

                                        jPanel19.setName("jPanel19"); // NOI18N

                                        jScrollPane4.setName("jScrollPane4"); // NOI18N

                                        jtbl_distribucion.setModel(this.jtable_modelo_distribucion);
                                        jtbl_distribucion.setName("jtbl_distribucion"); // NOI18N
                                        jtbl_distribucion.setRowHeight(22);
                                        jtbl_distribucion.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jtbl_distribucionMouseClicked(evt);
                                                if(evt.getClickCount() >= 1)
                                                {
                                                    dioclickdfoto(evt);
                                                }
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclickd(evt);
                                                }
                                            }
                                        });
                                        jScrollPane4.setViewportView(jtbl_distribucion);

                                        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
                                        jPanel19.setLayout(jPanel19Layout);
                                        jPanel19Layout.setHorizontalGroup(
                                            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 1073, Short.MAX_VALUE)
                                        );
                                        jPanel19Layout.setVerticalGroup(
                                            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel19Layout.createSequentialGroup()
                                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 341, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        );

                                        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
                                        jPanel5.setLayout(jPanel5Layout);
                                        jPanel5Layout.setHorizontalGroup(
                                            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel5Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                                        .addComponent(jLabel26)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jtf_buscarenjtable, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(jlb_resultado, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                                        .addComponent(jLabel25)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                        .addComponent(jrbtn_columnaclave)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                        .addComponent(jrbtn_item))
                                                    .addComponent(jchk_graficadistribucion))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(214, Short.MAX_VALUE))
                                            .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        );
                                        jPanel5Layout.setVerticalGroup(
                                            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel5Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                                        .addComponent(jchk_graficadistribucion)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jrbtn_columnaclave)
                                                            .addComponent(jrbtn_item)
                                                            .addComponent(jLabel25))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jtf_buscarenjtable, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel26)
                                                            .addComponent(jlb_resultado)))
                                                    .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(17, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel5.TabConstraints.tabTitle"), jPanel5); // NOI18N

                                        jPanel6.setName("jPanel6"); // NOI18N

                                        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel7.border.title"))); // NOI18N
                                        jPanel7.setName("jPanel7"); // NOI18N

                                        jScrollPane5.setName("jScrollPane5"); // NOI18N

                                        jt_ventasmensuales.setModel(this.jtable_modelo_resumen);
                                        jt_ventasmensuales.setName("jt_ventasmensuales"); // NOI18N
                                        jScrollPane5.setViewportView(jt_ventasmensuales);

                                        jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
                                        jCheckBox1.setName("jCheckBox1"); // NOI18N
                                        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jCheckBox1ActionPerformed(evt);
                                            }
                                        });

                                        jCheckBox2.setText(resourceMap.getString("jCheckBox2.text")); // NOI18N
                                        jCheckBox2.setName("jCheckBox2"); // NOI18N
                                        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jCheckBox2ActionPerformed(evt);
                                            }
                                        });

                                        jCheckBox3.setText(resourceMap.getString("jCheckBox3.text")); // NOI18N
                                        jCheckBox3.setName("jCheckBox3"); // NOI18N
                                        jCheckBox3.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jCheckBox3ActionPerformed(evt);
                                            }
                                        });

                                        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
                                        jPanel7.setLayout(jPanel7Layout);
                                        jPanel7Layout.setHorizontalGroup(
                                            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel7Layout.createSequentialGroup()
                                                .addComponent(jCheckBox3)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jCheckBox1)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(jCheckBox2)
                                                .addContainerGap(566, Short.MAX_VALUE))
                                            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 1047, Short.MAX_VALUE)
                                        );
                                        jPanel7Layout.setVerticalGroup(
                                            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                                                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jCheckBox3)
                                                    .addComponent(jCheckBox1)
                                                    .addComponent(jCheckBox2))
                                                .addContainerGap())
                                        );

                                        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
                                        jPanel6.setLayout(jPanel6Layout);
                                        jPanel6Layout.setHorizontalGroup(
                                            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel6Layout.createSequentialGroup()
                                                .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addContainerGap())
                                        );
                                        jPanel6Layout.setVerticalGroup(
                                            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel6Layout.createSequentialGroup()
                                                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(241, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

                                        jPanel8.setName("jPanel8"); // NOI18N

                                        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel9.border.title"))); // NOI18N
                                        jPanel9.setName("jPanel9"); // NOI18N

                                        jScrollPane6.setName("jScrollPane6"); // NOI18N

                                        jt_articulosestadisticas.setModel(this.jtable_modelo_articyestadis);
                                        jt_articulosestadisticas.setName("jt_articulosestadisticas"); // NOI18N
                                        jt_articulosestadisticas.setRowHeight(22);
                                        jt_articulosestadisticas.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jt_articulosestadisticasMouseClicked(evt);
                                                if(evt.getClickCount() >= 1)
                                                {
                                                    dioclicketfoto(evt);
                                                }
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclickedit(evt);
                                                    //System.out.println(" double click" );

                                                }
                                            }
                                        });
                                        jScrollPane6.setViewportView(jt_articulosestadisticas);

                                        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
                                        jPanel9.setLayout(jPanel9Layout);
                                        jPanel9Layout.setHorizontalGroup(
                                            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 1057, Short.MAX_VALUE)
                                        );
                                        jPanel9Layout.setVerticalGroup(
                                            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE)
                                        );

                                        jPanel17.setName("jPanel17"); // NOI18N

                                        jScrollPane17.setName("jScrollPane17"); // NOI18N

                                        jep_articuloimagen3.setContentType(resourceMap.getString("jep_articuloimagen3.contentType")); // NOI18N
                                        jep_articuloimagen3.setName("jep_articuloimagen3"); // NOI18N
                                        jScrollPane17.setViewportView(jep_articuloimagen3);

                                        jbtn_imagenfull4.setFont(resourceMap.getFont("jbtn_imagenfull4.font")); // NOI18N
                                        jbtn_imagenfull4.setIcon(resourceMap.getIcon("jbtn_imagenfull4.icon")); // NOI18N
                                        jbtn_imagenfull4.setText(resourceMap.getString("jbtn_imagenfull4.text")); // NOI18N
                                        jbtn_imagenfull4.setToolTipText(resourceMap.getString("jbtn_imagenfull4.toolTipText")); // NOI18N
                                        jbtn_imagenfull4.setName("jbtn_imagenfull4"); // NOI18N
                                        jbtn_imagenfull4.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_imagenfull4ActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup3.add(jrbn_repguar);
                                        jrbn_repguar.setText(resourceMap.getString("jrbn_repguar.text")); // NOI18N
                                        jrbn_repguar.setToolTipText(resourceMap.getString("jrbn_repguar.toolTipText")); // NOI18N
                                        jrbn_repguar.setActionCommand(resourceMap.getString("jrbn_repguar.actionCommand")); // NOI18N
                                        jrbn_repguar.setName("jrbn_repguar"); // NOI18N
                                        jrbn_repguar.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbn_repguarActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup3.add(jrbn_repcontruye);
                                        jrbn_repcontruye.setText(resourceMap.getString("jrbn_repcontruye.text")); // NOI18N
                                        jrbn_repcontruye.setToolTipText(resourceMap.getString("jrbn_repcontruye.toolTipText")); // NOI18N
                                        jrbn_repcontruye.setActionCommand(resourceMap.getString("jrbn_repcontruye.actionCommand")); // NOI18N
                                        jrbn_repcontruye.setName("jrbn_repcontruye"); // NOI18N
                                        jrbn_repcontruye.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbn_repcontruyeActionPerformed(evt);
                                            }
                                        });

                                        jtf_fotoidrotarti.setFont(resourceMap.getFont("jtf_fotoidrotarti.font")); // NOI18N
                                        jtf_fotoidrotarti.setName("jtf_fotoidrotarti"); // NOI18N

                                        buttonGroup2.add(jrbtn_columnaclaverot);
                                        jrbtn_columnaclaverot.setText(resourceMap.getString("jrbtn_columnaclaverot.text")); // NOI18N
                                        jrbtn_columnaclaverot.setActionCommand(resourceMap.getString("jrbtn_columnaclaverot.actionCommand")); // NOI18N
                                        jrbtn_columnaclaverot.setName("jrbtn_columnaclaverot"); // NOI18N
                                        jrbtn_columnaclaverot.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_columnaclaverotActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jRadioButtonrot);
                                        jRadioButtonrot.setText(resourceMap.getString("jRadioButtonrot.text")); // NOI18N
                                        jRadioButtonrot.setActionCommand(resourceMap.getString("jRadioButtonrot.actionCommand")); // NOI18N
                                        jRadioButtonrot.setName("jRadioButtonrot"); // NOI18N
                                        jRadioButtonrot.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jRadioButtonrotActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jrbtn_itemrot);
                                        jrbtn_itemrot.setText(resourceMap.getString("jrbtn_itemrot.text")); // NOI18N
                                        jrbtn_itemrot.setActionCommand(resourceMap.getString("jrbtn_itemrot.actionCommand")); // NOI18N
                                        jrbtn_itemrot.setName("jrbtn_itemrot"); // NOI18N
                                        jrbtn_itemrot.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_itemrotActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jrbtn_linearot);
                                        jrbtn_linearot.setText(resourceMap.getString("jrbtn_linearot.text")); // NOI18N
                                        jrbtn_linearot.setActionCommand(resourceMap.getString("jrbtn_linearot.actionCommand")); // NOI18N
                                        jrbtn_linearot.setName("jrbtn_linearot"); // NOI18N
                                        jrbtn_linearot.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_linearotActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jrbtn_temporadarot);
                                        jrbtn_temporadarot.setText(resourceMap.getString("jrbtn_temporadarot.text")); // NOI18N
                                        jrbtn_temporadarot.setActionCommand(resourceMap.getString("jrbtn_temporadarot.actionCommand")); // NOI18N
                                        jrbtn_temporadarot.setName("jrbtn_temporadarot"); // NOI18N
                                        jrbtn_temporadarot.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_temporadarotActionPerformed(evt);
                                            }
                                        });

                                        jLabel39.setFont(resourceMap.getFont("jLabel39.font")); // NOI18N
                                        jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
                                        jLabel39.setName("jLabel39"); // NOI18N

                                        jtf_buscarenjtablerot.setName("jtf_buscarenjtablerot"); // NOI18N
                                        jtf_buscarenjtablerot.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_buscarenjtablerotActionPerformed(evt);
                                            }
                                        });

                                        jlb_resultado2.setFont(resourceMap.getFont("jlb_resultado2.font")); // NOI18N
                                        jlb_resultado2.setText(resourceMap.getString("jlb_resultado2.text")); // NOI18N
                                        jlb_resultado2.setName("jlb_resultado2"); // NOI18N

                                        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
                                        jPanel17.setLayout(jPanel17Layout);
                                        jPanel17Layout.setHorizontalGroup(
                                            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel17Layout.createSequentialGroup()
                                                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addComponent(jLabel39)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jtf_buscarenjtablerot, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addGap(10, 10, 10)
                                                        .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addComponent(jrbn_repguar)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                        .addComponent(jrbn_repcontruye))
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addComponent(jbtn_imagenfull4)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jtf_fotoidrotarti, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addComponent(jlb_resultado2, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addComponent(jrbtn_columnaclaverot)
                                                        .addGap(9, 9, 9)
                                                        .addComponent(jRadioButtonrot))
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addComponent(jrbtn_itemrot)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jrbtn_linearot)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jrbtn_temporadarot)))
                                                .addContainerGap())
                                        );
                                        jPanel17Layout.setVerticalGroup(
                                            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel17Layout.createSequentialGroup()
                                                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel17Layout.createSequentialGroup()
                                                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jbtn_imagenfull4)
                                                            .addComponent(jtf_fotoidrotarti, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jrbn_repguar)
                                                            .addComponent(jrbn_repcontruye))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jrbtn_columnaclaverot)
                                                            .addComponent(jRadioButtonrot)))
                                                    .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                                                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jlb_resultado2)
                                                    .addComponent(jtf_buscarenjtablerot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel39))
                                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                                                .addContainerGap(98, Short.MAX_VALUE)
                                                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jrbtn_itemrot)
                                                    .addComponent(jrbtn_linearot)
                                                    .addComponent(jrbtn_temporadarot))
                                                .addGap(33, 33, 33))
                                        );

                                        jPanel24.setName("jPanel24"); // NOI18N

                                        jScrollPane16.setName("jScrollPane16"); // NOI18N

                                        System.out.println("esta inicializando estadistica");
                                        jtbl_estadisticasarticulo1.setFont(resourceMap.getFont("jtbl_estadisticasarticulo1.font")); // NOI18N
                                        jtbl_estadisticasarticulo1.setModel(this.jtable_modelo_estadisticas);
                                        jtbl_estadisticasarticulo1.setName("jtbl_estadisticasarticulo1"); // NOI18N
                                        jtbl_estadisticasarticulo1.setRowHeight(26);
                                        jScrollPane16.setViewportView(jtbl_estadisticasarticulo1);

                                        javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
                                        jPanel24.setLayout(jPanel24Layout);
                                        jPanel24Layout.setHorizontalGroup(
                                            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 659, Short.MAX_VALUE)
                                        );
                                        jPanel24Layout.setVerticalGroup(
                                            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel24Layout.createSequentialGroup()
                                                .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)
                                                .addContainerGap())
                                        );

                                        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
                                        jPanel8.setLayout(jPanel8Layout);
                                        jPanel8Layout.setHorizontalGroup(
                                            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel8Layout.createSequentialGroup()
                                                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 408, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                            .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        );
                                        jPanel8Layout.setVerticalGroup(
                                            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel8Layout.createSequentialGroup()
                                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(jPanel8Layout.createSequentialGroup()
                                                        .addGap(11, 11, 11)
                                                        .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel8.TabConstraints.tabTitle"), jPanel8); // NOI18N

                                        jPanel10.setName("jPanel10"); // NOI18N

                                        jp_invxtienda.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jp_invxtienda.border.border.title")))); // NOI18N
                                        jp_invxtienda.setName("jp_invxtienda"); // NOI18N

                                        jScrollPane7.setName("jScrollPane7"); // NOI18N

                                        jt_invextie.setModel(this.jtable_modelo_invextie);
                                        jt_invextie.setName("jt_invextie"); // NOI18N
                                        jt_invextie.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jt_invextieMouseClicked(evt);
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclickinvextie(evt);
                                                    //System.out.println(" double click" );

                                                }
                                            }
                                        });
                                        jScrollPane7.setViewportView(jt_invextie);

                                        javax.swing.GroupLayout jp_invxtiendaLayout = new javax.swing.GroupLayout(jp_invxtienda);
                                        jp_invxtienda.setLayout(jp_invxtiendaLayout);
                                        jp_invxtiendaLayout.setHorizontalGroup(
                                            jp_invxtiendaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 1039, Short.MAX_VALUE)
                                        );
                                        jp_invxtiendaLayout.setVerticalGroup(
                                            jp_invxtiendaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                        );

                                        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel13.border.title"))); // NOI18N
                                        jPanel13.setName("jPanel13"); // NOI18N

                                        jScrollPane9.setName("jScrollPane9"); // NOI18N

                                        jtb_almacen_catalogo.setModel(this.jtable_modelo_artialma);
                                        jtb_almacen_catalogo.setName("jtb_almacen_catalogo"); // NOI18N
                                        jtb_almacen_catalogo.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jtb_almacen_catalogoMouseClicked(evt);
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclicalmdis(evt);
                                                }
                                            }
                                        });
                                        jScrollPane9.setViewportView(jtb_almacen_catalogo);

                                        jlbl_textobuscado.setFont(resourceMap.getFont("jlbl_textobuscado.font")); // NOI18N
                                        jlbl_textobuscado.setName("jlbl_textobuscado"); // NOI18N

                                        jLabel34.setFont(resourceMap.getFont("jLabel34.font")); // NOI18N
                                        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
                                        jLabel34.setName("jLabel34"); // NOI18N

                                        jlbl_cantidadregistros1.setFont(resourceMap.getFont("jlbl_cantidadregistros1.font")); // NOI18N
                                        jlbl_cantidadregistros1.setText(resourceMap.getString("jlbl_cantidadregistros1.text")); // NOI18N
                                        jlbl_cantidadregistros1.setName("jlbl_cantidadregistros1"); // NOI18N

                                        jLabel35.setFont(resourceMap.getFont("jLabel35.font")); // NOI18N
                                        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
                                        jLabel35.setName("jLabel35"); // NOI18N

                                        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
                                        jLabel36.setName("jLabel36"); // NOI18N

                                        jckbx_veralmacen.setText(resourceMap.getString("jckbx_veralmacen.text")); // NOI18N
                                        jckbx_veralmacen.setName("jckbx_veralmacen"); // NOI18N
                                        jckbx_veralmacen.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jckbx_veralmacenActionPerformed(evt);
                                            }
                                        });

                                        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
                                        jPanel13.setLayout(jPanel13Layout);
                                        jPanel13Layout.setHorizontalGroup(
                                            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel13Layout.createSequentialGroup()
                                                .addComponent(jLabel36)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jlbl_textobuscado, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLabel34)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(jlbl_cantidadregistros1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLabel35)
                                                .addGap(148, 148, 148)
                                                .addComponent(jckbx_veralmacen)
                                                .addContainerGap(411, Short.MAX_VALUE))
                                            .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 1047, Short.MAX_VALUE)
                                        );
                                        jPanel13Layout.setVerticalGroup(
                                            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel13Layout.createSequentialGroup()
                                                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jLabel36)
                                                    .addComponent(jlbl_textobuscado)
                                                    .addComponent(jLabel34)
                                                    .addComponent(jlbl_cantidadregistros1)
                                                    .addComponent(jLabel35)
                                                    .addComponent(jckbx_veralmacen))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(25, Short.MAX_VALUE))
                                        );

                                        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
                                        jPanel10.setLayout(jPanel10Layout);
                                        jPanel10Layout.setHorizontalGroup(
                                            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                    .addComponent(jp_invxtienda, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                                .addContainerGap())
                                        );
                                        jPanel10Layout.setVerticalGroup(
                                            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel10Layout.createSequentialGroup()
                                                .addComponent(jp_invxtienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(19, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel10.TabConstraints.tabTitle"), jPanel10); // NOI18N

                                        jPanel11.setName("jPanel11"); // NOI18N

                                        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel12.border.title"))); // NOI18N
                                        jPanel12.setName("jPanel12"); // NOI18N

                                        jScrollPane8.setName("jScrollPane8"); // NOI18N

                                        jtb_articmasven.setModel(this.jtable_modelo_amv);
                                        jtb_articmasven.setName("jtb_articmasven"); // NOI18N
                                        jtb_articmasven.setRowHeight(22);
                                        jtb_articmasven.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jtb_articmasvenMouseClicked(evt);
                                                if(evt.getClickCount() >= 1)
                                                {
                                                    dioclickfotovye(evt);
                                                    //System.out.println(" double click" );

                                                }
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclickamv(evt);
                                                    //System.out.println(" double click" );

                                                }
                                            }
                                        });
                                        jScrollPane8.setViewportView(jtb_articmasven);

                                        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
                                        jPanel12.setLayout(jPanel12Layout);
                                        jPanel12Layout.setHorizontalGroup(
                                            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 1057, Short.MAX_VALUE)
                                        );
                                        jPanel12Layout.setVerticalGroup(
                                            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
                                        );

                                        jPanel22.setName("jPanel22"); // NOI18N

                                        jLabel27.setFont(resourceMap.getFont("jLabel27.font")); // NOI18N
                                        jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
                                        jLabel27.setName("jLabel27"); // NOI18N

                                        jlbl_cantidadregistros.setFont(resourceMap.getFont("jlbl_cantidadregistros.font")); // NOI18N
                                        jlbl_cantidadregistros.setText(resourceMap.getString("jlbl_cantidadregistros.text")); // NOI18N
                                        jlbl_cantidadregistros.setName("jlbl_cantidadregistros"); // NOI18N

                                        jLabel28.setFont(resourceMap.getFont("jLabel28.font")); // NOI18N
                                        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
                                        jLabel28.setName("jLabel28"); // NOI18N

                                        jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
                                        jLabel29.setName("jLabel29"); // NOI18N

                                        jdc_fechainicial.setToolTipText(resourceMap.getString("jdc_fechainicial.toolTipText")); // NOI18N
                                        jdc_fechainicial.setDateFormatString(resourceMap.getString("jdc_fechainicial.dateFormatString")); // NOI18N
                                        jdc_fechainicial.setName("jdc_fechainicial"); // NOI18N
                                        jdc_fechainicial.addInputMethodListener(new java.awt.event.InputMethodListener() {
                                            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
                                            }
                                            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                                                jdc_fechainicialInputMethodTextChanged(evt);
                                            }
                                        });
                                        jdc_fechainicial.addKeyListener(new java.awt.event.KeyAdapter() {
                                            public void keyPressed(java.awt.event.KeyEvent evt) {
                                                jdc_fechainicialKeyPressed(evt);
                                            }
                                        });

                                        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
                                        jLabel30.setName("jLabel30"); // NOI18N

                                        jdc_fechafinal.setToolTipText(resourceMap.getString("jdc_fechafinal.toolTipText")); // NOI18N
                                        jdc_fechafinal.setDateFormatString(resourceMap.getString("jdc_fechafinal.dateFormatString")); // NOI18N
                                        jdc_fechafinal.setMaxSelectableDate(new java.util.Date(253370790102000L));
                                        jdc_fechafinal.setName("jdc_fechafinal"); // NOI18N

                                        jbtn_generareporte.setText(resourceMap.getString("jbtn_generareporte.text")); // NOI18N
                                        jbtn_generareporte.setToolTipText(resourceMap.getString("jbtn_generareporte.toolTipText")); // NOI18N
                                        jbtn_generareporte.setName("jbtn_generareporte"); // NOI18N
                                        jbtn_generareporte.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_generareporteActionPerformed(evt);
                                            }
                                        });

                                        jcb_verfotos1.setText(resourceMap.getString("jcb_verfotos1.text")); // NOI18N
                                        jcb_verfotos1.setToolTipText(resourceMap.getString("jcb_verfotos1.toolTipText")); // NOI18N
                                        jcb_verfotos1.setName("jcb_verfotos1"); // NOI18N
                                        jcb_verfotos1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jcb_verfotos1ActionPerformed(evt);
                                            }
                                        });

                                        jLabel32.setFont(resourceMap.getFont("jLabel32.font")); // NOI18N
                                        jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
                                        jLabel32.setName("jLabel32"); // NOI18N

                                        buttonGroup2.add(jrbtn_columnaclave1);
                                        jrbtn_columnaclave1.setText(resourceMap.getString("jrbtn_columnaclave1.text")); // NOI18N
                                        jrbtn_columnaclave1.setActionCommand(resourceMap.getString("jrbtn_columnaclave1.actionCommand")); // NOI18N
                                        jrbtn_columnaclave1.setName("jrbtn_columnaclave1"); // NOI18N
                                        jrbtn_columnaclave1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_columnaclave1ActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jRadioButton1);
                                        jRadioButton1.setText(resourceMap.getString("jRadioButton1.text")); // NOI18N
                                        jRadioButton1.setActionCommand(resourceMap.getString("jRadioButton1.actionCommand")); // NOI18N
                                        jRadioButton1.setName("jRadioButton1"); // NOI18N
                                        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jRadioButton1ActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jrbtn_item1);
                                        jrbtn_item1.setText(resourceMap.getString("jrbtn_item1.text")); // NOI18N
                                        jrbtn_item1.setActionCommand(resourceMap.getString("jrbtn_item1.actionCommand")); // NOI18N
                                        jrbtn_item1.setName("jrbtn_item1"); // NOI18N
                                        jrbtn_item1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_item1ActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jrbtn_linea);
                                        jrbtn_linea.setText(resourceMap.getString("jrbtn_linea.text")); // NOI18N
                                        jrbtn_linea.setActionCommand(resourceMap.getString("jrbtn_linea.actionCommand")); // NOI18N
                                        jrbtn_linea.setName("jrbtn_linea"); // NOI18N
                                        jrbtn_linea.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_lineaActionPerformed(evt);
                                            }
                                        });

                                        buttonGroup2.add(jrbtn_linea1);
                                        jrbtn_linea1.setText(resourceMap.getString("jrbtn_linea1.text")); // NOI18N
                                        jrbtn_linea1.setActionCommand(resourceMap.getString("jrbtn_linea1.actionCommand")); // NOI18N
                                        jrbtn_linea1.setName("jrbtn_linea1"); // NOI18N
                                        jrbtn_linea1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jrbtn_linea1ActionPerformed(evt);
                                            }
                                        });

                                        jLabel31.setFont(resourceMap.getFont("jLabel31.font")); // NOI18N
                                        jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
                                        jLabel31.setName("jLabel31"); // NOI18N

                                        jtf_buscarenjtableamv.setName("jtf_buscarenjtableamv"); // NOI18N
                                        jtf_buscarenjtableamv.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jtf_buscarenjtableamvActionPerformed(evt);
                                            }
                                        });

                                        jlb_resultado1.setFont(resourceMap.getFont("jlb_resultado1.font")); // NOI18N
                                        jlb_resultado1.setText(resourceMap.getString("jlb_resultado1.text")); // NOI18N
                                        jlb_resultado1.setName("jlb_resultado1"); // NOI18N

                                        jScrollPane12.setName("jScrollPane12"); // NOI18N

                                        jep_articuloimagen1.setContentType(resourceMap.getString("jep_articuloimagen1.contentType")); // NOI18N
                                        jep_articuloimagen1.setName("jep_articuloimagen1"); // NOI18N
                                        jScrollPane12.setViewportView(jep_articuloimagen1);

                                        jtf_fotoidmasven.setFont(resourceMap.getFont("jtf_fotoidmasven.font")); // NOI18N
                                        jtf_fotoidmasven.setName("jtf_fotoidmasven"); // NOI18N

                                        jbtn_imagenfull5.setFont(resourceMap.getFont("jbtn_imagenfull5.font")); // NOI18N
                                        jbtn_imagenfull5.setIcon(resourceMap.getIcon("jbtn_imagenfull5.icon")); // NOI18N
                                        jbtn_imagenfull5.setText(resourceMap.getString("jbtn_imagenfull5.text")); // NOI18N
                                        jbtn_imagenfull5.setToolTipText(resourceMap.getString("jbtn_imagenfull5.toolTipText")); // NOI18N
                                        jbtn_imagenfull5.setName("jbtn_imagenfull5"); // NOI18N
                                        jbtn_imagenfull5.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_imagenfull5ActionPerformed(evt);
                                            }
                                        });

                                        jcbx_tiendas.setToolTipText(resourceMap.getString("jcbx_tiendas.toolTipText")); // NOI18N
                                        jcbx_tiendas.setName("jcbx_tiendas"); // NOI18N
                                        jcbx_tiendas.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jcbx_tiendasActionPerformed(evt);
                                            }
                                        });

                                        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
                                        jPanel22.setLayout(jPanel22Layout);
                                        jPanel22Layout.setHorizontalGroup(
                                            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel22Layout.createSequentialGroup()
                                                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel22Layout.createSequentialGroup()
                                                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addGroup(jPanel22Layout.createSequentialGroup()
                                                                .addComponent(jLabel27)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jlbl_cantidadregistros, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jLabel28)
                                                                .addGap(18, 18, 18)
                                                                .addComponent(jLabel29)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jdc_fechainicial, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jdc_fechafinal, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                            .addGroup(jPanel22Layout.createSequentialGroup()
                                                                .addComponent(jLabel32)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                .addComponent(jrbtn_columnaclave1)
                                                                .addGap(9, 9, 9)
                                                                .addComponent(jRadioButton1)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                                .addComponent(jrbtn_item1)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jrbtn_linea)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jrbtn_linea1)))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(jcbx_tiendas, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jbtn_generareporte))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 159, Short.MAX_VALUE))
                                                    .addGroup(jPanel22Layout.createSequentialGroup()
                                                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addGroup(jPanel22Layout.createSequentialGroup()
                                                                .addContainerGap()
                                                                .addComponent(jcb_verfotos1))
                                                            .addGroup(jPanel22Layout.createSequentialGroup()
                                                                .addComponent(jLabel31)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jtf_buscarenjtableamv, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                .addComponent(jlb_resultado1, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 268, Short.MAX_VALUE)
                                                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                            .addComponent(jbtn_imagenfull5)
                                                            .addComponent(jtf_fotoidmasven, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                        .addGap(39, 39, 39)))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap())
                                        );
                                        jPanel22Layout.setVerticalGroup(
                                            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel22Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                        .addComponent(jLabel27)
                                                        .addComponent(jlbl_cantidadregistros)
                                                        .addComponent(jLabel28))
                                                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                        .addComponent(jLabel30)
                                                        .addComponent(jLabel29, javax.swing.GroupLayout.Alignment.TRAILING)
                                                        .addComponent(jdc_fechainicial, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                        .addComponent(jdc_fechafinal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addComponent(jbtn_generareporte))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(jPanel22Layout.createSequentialGroup()
                                                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jLabel32)
                                                            .addComponent(jrbtn_columnaclave1)
                                                            .addComponent(jRadioButton1)
                                                            .addComponent(jrbtn_item1)
                                                            .addComponent(jrbtn_linea)
                                                            .addComponent(jrbtn_linea1))
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(jtf_buscarenjtableamv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                            .addComponent(jLabel31)
                                                            .addComponent(jlb_resultado1))
                                                        .addGap(49, 49, 49)
                                                        .addComponent(jcb_verfotos1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(jPanel22Layout.createSequentialGroup()
                                                        .addGap(2, 2, 2)
                                                        .addComponent(jcbx_tiendas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(7, 7, 7)
                                                        .addComponent(jtf_fotoidmasven, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jbtn_imagenfull5)))
                                                .addContainerGap(11, Short.MAX_VALUE))
                                            .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                        );

                                        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
                                        jPanel11.setLayout(jPanel11Layout);
                                        jPanel11Layout.setHorizontalGroup(
                                            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        );
                                        jPanel11Layout.setVerticalGroup(
                                            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel11Layout.createSequentialGroup()
                                                .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel11.TabConstraints.tabTitle"), jPanel11); // NOI18N

                                        jPanel14.setName("jPanel14"); // NOI18N

                                        jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel15.border.title"))); // NOI18N
                                        jPanel15.setName("jPanel15"); // NOI18N

                                        jScrollPane10.setName("jScrollPane10"); // NOI18N

                                        jt_comprasxmes.setModel(this.jtable_modelo_comprasxmes);
                                        jt_comprasxmes.setName("jt_comprasxmes"); // NOI18N
                                        jt_comprasxmes.setRowHeight(22);
                                        jScrollPane10.setViewportView(jt_comprasxmes);

                                        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
                                        jPanel15.setLayout(jPanel15Layout);
                                        jPanel15Layout.setHorizontalGroup(
                                            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 1047, Short.MAX_VALUE)
                                        );
                                        jPanel15Layout.setVerticalGroup(
                                            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        );

                                        jPanel25.setName("jPanel25"); // NOI18N

                                        jScrollPane18.setName("jScrollPane18"); // NOI18N

                                        jtb_comxfam_detalleprov_artis.setFont(resourceMap.getFont("jtb_comxfam_detalleprov_artis.font")); // NOI18N
                                        jtb_comxfam_detalleprov_artis.setModel(this.jtable_modelo_comxfam_detpro_artis);
                                        jtb_comxfam_detalleprov_artis.setName("jtb_comxfam_detalleprov_artis"); // NOI18N
                                        jtb_comxfam_detalleprov_artis.setRowHeight(20);
                                        jScrollPane18.setViewportView(jtb_comxfam_detalleprov_artis);

                                        jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
                                        jLabel33.setName("jLabel33"); // NOI18N

                                        jdc_fechainicial1.setToolTipText(resourceMap.getString("jdc_fechainicial1.toolTipText")); // NOI18N
                                        jdc_fechainicial1.setDateFormatString(resourceMap.getString("jdc_fechainicial1.dateFormatString")); // NOI18N
                                        jdc_fechainicial1.setName("jdc_fechainicial1"); // NOI18N
                                        jdc_fechainicial1.addInputMethodListener(new java.awt.event.InputMethodListener() {
                                            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
                                            }
                                            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                                                jdc_fechainicial1InputMethodTextChanged(evt);
                                            }
                                        });
                                        jdc_fechainicial1.addKeyListener(new java.awt.event.KeyAdapter() {
                                            public void keyPressed(java.awt.event.KeyEvent evt) {
                                                jdc_fechainicial1KeyPressed(evt);
                                            }
                                        });

                                        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
                                        jLabel37.setName("jLabel37"); // NOI18N

                                        jdc_fechafinal1.setToolTipText(resourceMap.getString("jdc_fechafinal1.toolTipText")); // NOI18N
                                        jdc_fechafinal1.setDateFormatString(resourceMap.getString("jdc_fechafinal1.dateFormatString")); // NOI18N
                                        jdc_fechafinal1.setMaxSelectableDate(new java.util.Date(253370790102000L));
                                        jdc_fechafinal1.setName("jdc_fechafinal1"); // NOI18N

                                        jcbx_tiendas1.setToolTipText(resourceMap.getString("jcbx_tiendas1.toolTipText")); // NOI18N
                                        jcbx_tiendas1.setName("jcbx_tiendas1"); // NOI18N
                                        jcbx_tiendas1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jcbx_tiendas1ActionPerformed(evt);
                                            }
                                        });

                                        jbtn_generareporte1.setText(resourceMap.getString("jbtn_generareporte1.text")); // NOI18N
                                        jbtn_generareporte1.setToolTipText(resourceMap.getString("jbtn_generareporte1.toolTipText")); // NOI18N
                                        jbtn_generareporte1.setName("jbtn_generareporte1"); // NOI18N
                                        jbtn_generareporte1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_generareporte1ActionPerformed(evt);
                                            }
                                        });

                                        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
                                        jPanel25.setLayout(jPanel25Layout);
                                        jPanel25Layout.setHorizontalGroup(
                                            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel25Layout.createSequentialGroup()
                                                .addGap(77, 77, 77)
                                                .addComponent(jLabel33)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jdc_fechainicial1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jdc_fechafinal1, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 214, Short.MAX_VALUE)
                                                .addComponent(jcbx_tiendas1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(jbtn_generareporte1)
                                                .addGap(129, 129, 129))
                                            .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel25Layout.createSequentialGroup()
                                                    .addContainerGap()
                                                    .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 1043, Short.MAX_VALUE)
                                                    .addContainerGap()))
                                        );
                                        jPanel25Layout.setVerticalGroup(
                                            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel25Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                        .addComponent(jbtn_generareporte1)
                                                        .addComponent(jcbx_tiendas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                        .addComponent(jLabel37)
                                                        .addComponent(jLabel33, javax.swing.GroupLayout.Alignment.TRAILING)
                                                        .addComponent(jdc_fechainicial1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                        .addComponent(jdc_fechafinal1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addContainerGap(322, Short.MAX_VALUE))
                                            .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel25Layout.createSequentialGroup()
                                                    .addGap(43, 43, 43)
                                                    .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
                                                    .addContainerGap()))
                                        );

                                        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
                                        jPanel14.setLayout(jPanel14Layout);
                                        jPanel14Layout.setHorizontalGroup(
                                            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(jPanel25, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                    .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                                .addContainerGap())
                                        );
                                        jPanel14Layout.setVerticalGroup(
                                            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel14Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel14.TabConstraints.tabTitle"), jPanel14); // NOI18N

                                        jPanel3.setName("jPanel3"); // NOI18N

                                        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
                                        jPanel3.setLayout(jPanel3Layout);
                                        jPanel3Layout.setHorizontalGroup(
                                            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGap(0, 1073, Short.MAX_VALUE)
                                        );
                                        jPanel3Layout.setVerticalGroup(
                                            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGap(0, 547, Short.MAX_VALUE)
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

                                        jPanel16.setName("jPanel16"); // NOI18N
                                        jPanel16.setPreferredSize(new java.awt.Dimension(900, 522));

                                        jPanel20.setName("jPanel20"); // NOI18N

                                        jScrollPane11.setName("jScrollPane11"); // NOI18N

                                        jtb_catalogo_exis.setModel(this.jtable_modelo_existencias);
                                        jtb_catalogo_exis.setName("jtb_catalogo_exis"); // NOI18N
                                        jtb_catalogo_exis.setRowHeight(22);
                                        jtb_catalogo_exis.addMouseListener(new java.awt.event.MouseAdapter() {
                                            public void mouseClicked(java.awt.event.MouseEvent evt) {
                                                jtb_catalogo_exisMouseClicked(evt);
                                                if(evt.getClickCount() >= 1)
                                                {
                                                    dioclickexifop(evt);
                                                    //System.out.println(" double click" );

                                                }
                                                if(evt.getClickCount() >= 2)
                                                {
                                                    dioclickexi(evt);
                                                    //System.out.println(" double click" );

                                                }
                                            }
                                        });
                                        jtb_catalogo_exis.addKeyListener(new java.awt.event.KeyAdapter() {
                                            public void keyPressed(java.awt.event.KeyEvent evt) {
                                                jtb_catalogo_exisKeyPressed(evt);
                                            }
                                        });
                                        jScrollPane11.setViewportView(jtb_catalogo_exis);

                                        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
                                        jPanel20.setLayout(jPanel20Layout);
                                        jPanel20Layout.setHorizontalGroup(
                                            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 1073, Short.MAX_VALUE)
                                        );
                                        jPanel20Layout.setVerticalGroup(
                                            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()
                                                .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE)
                                                .addGap(24, 24, 24))
                                        );

                                        jPanel21.setName("jPanel21"); // NOI18N

                                        jScrollPane14.setName("jScrollPane14"); // NOI18N

                                        jep_articuloimagen.setContentType(resourceMap.getString("jep_articuloimagen.contentType")); // NOI18N
                                        jep_articuloimagen.setName("jep_articuloimagen"); // NOI18N
                                        jScrollPane14.setViewportView(jep_articuloimagen);

                                        jbtn_imagenfull6.setFont(resourceMap.getFont("jbtn_imagenfull6.font")); // NOI18N
                                        jbtn_imagenfull6.setIcon(resourceMap.getIcon("jbtn_imagenfull6.icon")); // NOI18N
                                        jbtn_imagenfull6.setText(resourceMap.getString("jbtn_imagenfull6.text")); // NOI18N
                                        jbtn_imagenfull6.setToolTipText(resourceMap.getString("jbtn_imagenfull6.toolTipText")); // NOI18N
                                        jbtn_imagenfull6.setName("jbtn_imagenfull6"); // NOI18N
                                        jbtn_imagenfull6.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jbtn_imagenfull6ActionPerformed(evt);
                                            }
                                        });

                                        jtf_fotoidstocks.setFont(resourceMap.getFont("jtf_fotoidstocks.font")); // NOI18N
                                        jtf_fotoidstocks.setName("jtf_fotoidstocks"); // NOI18N

                                        jchbx_verexistencias.setText(resourceMap.getString("jchbx_verexistencias.text")); // NOI18N
                                        jchbx_verexistencias.setName("jchbx_verexistencias"); // NOI18N
                                        jchbx_verexistencias.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jchbx_verexistenciasActionPerformed(evt);
                                            }
                                        });

                                        jtf_fotoidstocks1.setFont(resourceMap.getFont("jtf_fotoidstocks1.font")); // NOI18N
                                        jtf_fotoidstocks1.setName("jtf_fotoidstocks1"); // NOI18N

                                        jtf_fotoidstocks2.setFont(resourceMap.getFont("jtf_fotoidstocks2.font")); // NOI18N
                                        jtf_fotoidstocks2.setName("jtf_fotoidstocks2"); // NOI18N

                                        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
                                        jPanel21.setLayout(jPanel21Layout);
                                        jPanel21Layout.setHorizontalGroup(
                                            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel21Layout.createSequentialGroup()
                                                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()
                                                        .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(jchbx_verexistencias)
                                                            .addComponent(jbtn_imagenfull6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                            .addComponent(jtf_fotoidstocks, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                    .addGroup(jPanel21Layout.createSequentialGroup()
                                                        .addComponent(jtf_fotoidstocks1, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jtf_fotoidstocks2, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addContainerGap())
                                        );
                                        jPanel21Layout.setVerticalGroup(
                                            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel21Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(jPanel21Layout.createSequentialGroup()
                                                        .addComponent(jbtn_imagenfull6)
                                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                        .addComponent(jtf_fotoidstocks, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addGap(18, 18, 18)
                                                        .addComponent(jchbx_verexistencias)))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                                                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jtf_fotoidstocks1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jtf_fotoidstocks2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        );

                                        jPanel23.setName("jPanel23"); // NOI18N

                                        jScrollPane15.setName("jScrollPane15"); // NOI18N

                                        System.out.println("esta inicializando estadistica");
                                        jtbl_estadisticasarticulo.setFont(resourceMap.getFont("jtbl_estadisticasarticulo.font")); // NOI18N
                                        jtbl_estadisticasarticulo.setModel(this.jtable_modelo_estadisticas);
                                        jtbl_estadisticasarticulo.setName("jtbl_estadisticasarticulo"); // NOI18N
                                        jtbl_estadisticasarticulo.setRowHeight(26);
                                        jScrollPane15.setViewportView(jtbl_estadisticasarticulo);

                                        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
                                        jPanel23.setLayout(jPanel23Layout);
                                        jPanel23Layout.setHorizontalGroup(
                                            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE)
                                        );
                                        jPanel23Layout.setVerticalGroup(
                                            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                                        );

                                        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
                                        jPanel16.setLayout(jPanel16Layout);
                                        jPanel16Layout.setHorizontalGroup(
                                            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jPanel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addGroup(jPanel16Layout.createSequentialGroup()
                                                .addGap(10, 10, 10)
                                                .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        );
                                        jPanel16Layout.setVerticalGroup(
                                            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel16Layout.createSequentialGroup()
                                                .addContainerGap()
                                                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                    .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                    .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        );

                                        jTabbedPane1.addTab(resourceMap.getString("jPanel16.TabConstraints.tabTitle"), jPanel16); // NOI18N

                                        jMenuBar1.setName("jMenuBar1"); // NOI18N

                                        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
                                        jMenu1.setName("jMenu1"); // NOI18N

                                        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
                                        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
                                        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
                                        jmni_salir.setName("jmni_salir"); // NOI18N
                                        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jmni_salirActionPerformed(evt);
                                            }
                                        });
                                        jMenu1.add(jmni_salir);

                                        jMenuBar1.add(jMenu1);

                                        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
                                        jMenu2.setName("jMenu2"); // NOI18N

                                        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
                                        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
                                        jmni_escape.setName("jmni_escape"); // NOI18N
                                        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jmni_escapeActionPerformed(evt);
                                            }
                                        });
                                        jMenu2.add(jmni_escape);

                                        jmni_iraingresatexto.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
                                        jmni_iraingresatexto.setText(resourceMap.getString("jmni_iraingresatexto.text")); // NOI18N
                                        jmni_iraingresatexto.setName("jmni_iraingresatexto"); // NOI18N
                                        jmni_iraingresatexto.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jmni_iraingresatextoActionPerformed(evt);
                                            }
                                        });
                                        jMenu2.add(jmni_iraingresatexto);

                                        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F7, 0));
                                        jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
                                        jMenuItem1.setName("jMenuItem1"); // NOI18N
                                        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                                jMenuItem1ActionPerformed(evt);
                                            }
                                        });
                                        jMenu2.add(jMenuItem1);

                                        jMenuBar1.add(jMenu2);

                                        setJMenuBar(jMenuBar1);

                                        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                                        getContentPane().setLayout(layout);
                                        layout.setHorizontalGroup(
                                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1078, Short.MAX_VALUE)
                                        );
                                        layout.setVerticalGroup(
                                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 575, Short.MAX_VALUE)
                                        );

                                        pack();
                                    }// </editor-fold>//GEN-END:initComponents

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
      if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
        {
            this.dispose();
        }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jtf_provnombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_provnombreActionPerformed
        // TODO add your handling code here:
        //this.jtf_empapat.requestFocus();
}//GEN-LAST:event_jtf_provnombreActionPerformed

    private void jtf_domcalleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_domcalleActionPerformed
        // TODO add your handling code here:
        this.jtf_domcolonia.requestFocus();
    }//GEN-LAST:event_jtf_domcalleActionPerformed

    private void jtf_domcoloniaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_domcoloniaActionPerformed
        // TODO add your handling code here:
        this.jtf_dompobla.requestFocus();
    }//GEN-LAST:event_jtf_domcoloniaActionPerformed

    private void jtf_dompoblaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_dompoblaActionPerformed
        // TODO add your handling code here:
        this.jtf_domcod.requestFocus();
    }//GEN-LAST:event_jtf_dompoblaActionPerformed

    private void jtf_domcodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_domcodActionPerformed
        // TODO add your handling code here:
        this.jtf_domtelefono.requestFocus();
    }//GEN-LAST:event_jtf_domcodActionPerformed

    private void jtf_domtelefonoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_domtelefonoActionPerformed
        // TODO add your handling code here:
        this.jtf_email.requestFocus();
    }//GEN-LAST:event_jtf_domtelefonoActionPerformed

    private void jtf_emailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_emailActionPerformed
        // TODO add your handling code here:
        //this.jtf_empfoto.requestFocus();
    }//GEN-LAST:event_jtf_emailActionPerformed


private void jtb_articmasvenMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
           indexactual=this.jTabbedPane1.getSelectedIndex();
           if((indexactual==1)&&(yacarguehistorial==0))
                {
                    yacarguehistorial=1;
                    this.carga_datos_compras(4, this.jtf_provid.getText());
                }
            if((indexactual==2)&&(yacarguedistrialma==0))
                {
                    yacarguedistrialma=1;
                    this.carga_datos_distribucionalma(this.jtf_provid.getText().trim());
                }
           if((indexactual==3)&&(yacargueestaventa==0))
                {
                    yacargueestaventa=1;
                    this.contruir_reporte_resumen(3,"0","2010-05-01","2012-12-31",this.jtf_idsubfamilia.getText());
                }
           if((indexactual==4)&&(yacarguerotarti==0))
                {
                    yacarguerotarti=1;
                    this.cargar_datosarticulosexisyacum(1,"0", Integer.valueOf(this.jtf_idsubfamilia.getText()));
                }
           if((indexactual==5)&&(yacarguecostoinve==0))
                {
                    yacarguecostoinve=1;
                    this.cargar_datosinvextie(Integer.valueOf(this.jtf_idsubfamilia.getText()));
                }
           if((indexactual==6)&&(yacargueartmasven==0))
                {
                    yacargueartmasven=1;
                    this.cargar_datosarmasven(4, "2011-01-01", "2011-01-01",this.jtf_idsubfamilia.getText(),"0");
                }
           if((indexactual==7)&&(yacarguecomxmes==0))
                {
                    yacarguecomxmes=1;
                    this.cargar_datoscomprasxmes(Integer.valueOf(this.jtf_idsubfamilia.getText()));
                }
           if((indexactual==9)&&(yacargueminmax==0))
                {
                    yacargueminmax=1;
                    this.executabusqueda(6, 1, this.jtf_idsubfamilia.getText());
                     if (controltiendas==0)
                        {
                            this.iniciar_modelo_tiendasexis();
                        }
                        this.verexistencias();
                }

    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jrbtn_columnaclaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_columnaclaveActionPerformed
        // TODO add your handling code here:
        columnavisualisa=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_columnaclaveActionPerformed

    private void jrbtn_itemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_itemActionPerformed
        // TODO add your handling code here:
        columnavisualisa=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_itemActionPerformed

    private void jtf_buscarenjtableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_buscarenjtableActionPerformed
        // TODO add your handling code here:
        this.find_textoenjtable(columnavisualisa, 0, this.jtf_buscarenjtable.getText().toUpperCase().trim());
}//GEN-LAST:event_jtf_buscarenjtableActionPerformed

    private void jmni_iraingresatextoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_iraingresatextoActionPerformed
        // TODO add your handling code here:
        this.jtf_buscarenjtable.requestFocus();
    }//GEN-LAST:event_jmni_iraingresatextoActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
         articulos_sie_rep_resxsubfam_detalle repressubdet = new articulos_sie_rep_resxsubfam_detalle(Integer.valueOf(this.jtf_idsubfamilia.getText()),this.jtf_provnombre.getText());
                repressubdet.pack();
                repressubdet.setVisible(true);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jchk_graficadistribucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchk_graficadistribucionActionPerformed
        // TODO add your handling code here:
        this.contruir_grafica_distribuciontotal();
}//GEN-LAST:event_jchk_graficadistribucionActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        // TODO add your handling code here:
        this.contruir_grafica_distribuciontotalventa();
}//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
        // TODO add your handling code here:
        this.contruir_grafica_costo();
}//GEN-LAST:event_jCheckBox2ActionPerformed

    private void jCheckBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox3ActionPerformed
        // TODO add your handling code here:
        articulos_sie_rep_resxsubfam_detalle repressubdet = new articulos_sie_rep_resxsubfam_detalle(Integer.valueOf(this.jtf_idsubfamilia.getText()),this.jtf_provnombre.getText());
        repressubdet.pack();
        repressubdet.setVisible(true);
       
    }//GEN-LAST:event_jCheckBox3ActionPerformed

    private void jchbx_agregarsieunoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchbx_agregarsieunoActionPerformed
        // TODO add your handling code here:
        int folio=0;
        String texto="";
        texto="select * from x1distribucion_proveedor_subfam_inser("+this.jtf_idsubfamilia.getText()+",'"+this.jtf_provnombre.getText().toUpperCase()+"')";
        System.out.println(texto);
        try
             {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                        {

                            folio=rs.getInt(1);
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
            if (folio==1)
                    {
                        JOptionPane.showMessageDialog(null,"subfam ingresada Correctamente", "Sistema Integral(Agregar Subfamilia)",1);
                    }

}//GEN-LAST:event_jchbx_agregarsieunoActionPerformed

    private void jtf_buscarenjtableamvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_buscarenjtableamvActionPerformed
        // TODO add your handling code here:
        this.find_textoenjtableamv(columnavisualisa1, 0, this.jtf_buscarenjtableamv.getText().toUpperCase().trim());
}//GEN-LAST:event_jtf_buscarenjtableamvActionPerformed

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        // TODO add your handling code here:
        columnavisualisa1=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jrbtn_columnaclave1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_columnaclave1ActionPerformed
        // TODO add your handling code here:
        columnavisualisa1=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_columnaclave1ActionPerformed

    private void jrbtn_item1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_item1ActionPerformed
        // TODO add your handling code here:
        columnavisualisa1=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_item1ActionPerformed

    private void jrbtn_lineaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_lineaActionPerformed
        // TODO add your handling code here:
         columnavisualisa1=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_lineaActionPerformed

    private void jrbtn_linea1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_linea1ActionPerformed
        // TODO add your handling code here:
     columnavisualisa1=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_linea1ActionPerformed

    private void jcb_verfotos1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcb_verfotos1ActionPerformed
        // TODO add your handling code here:
        if(this.jcb_verfotos1.isSelected()==true) {
            this.verfotosestereporteamv();
        } else {
            this.quitarfotosestereporteamv();
        }
    }//GEN-LAST:event_jcb_verfotos1ActionPerformed

    private void jdc_fechainicialInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jdc_fechainicialInputMethodTextChanged
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechainicialInputMethodTextChanged

    private void jdc_fechainicialKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_fechainicialKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechainicialKeyPressed

    private void jbtn_generareporteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generareporteActionPerformed
        // TODO add your handling code here:
        SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");

        String pFechai = formato.format(this.jdc_fechainicial.getDate());//fecha final de reporte
        String pFecha = formato.format(this.jdc_fechafinal.getDate());//fecha final de reporte
        String idcli[]=this.jcbx_tiendas.getSelectedItem().toString().split(":");
        if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0) {
            this.cargar_datosarmasven(2,pFechai,pFecha,this.jtf_idsubfamilia.getText(),idcli[0]);
            // this.contruir_reporte_resumen(1,pFechai,pFecha,"0",esquesele);
        }
    }//GEN-LAST:event_jbtn_generareporteActionPerformed

    private void jckbx_veralmacenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jckbx_veralmacenActionPerformed
        // TODO add your handling code here:
        this.cargar_datosarticulosalmacen(this.jtf_provid.getText());
    }//GEN-LAST:event_jckbx_veralmacenActionPerformed

    private void jrbtn_columnaclaverotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_columnaclaverotActionPerformed
        // TODO add your handling code here:
        columnavisualisarot=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_columnaclaverotActionPerformed

    private void jRadioButtonrotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonrotActionPerformed
        // TODO add your handling code here:
        columnavisualisarot=Integer.parseInt(evt.getActionCommand().toString());

}//GEN-LAST:event_jRadioButtonrotActionPerformed

    private void jrbtn_itemrotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_itemrotActionPerformed
        // TODO add your handling code here:
        columnavisualisarot=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_itemrotActionPerformed

    private void jrbtn_linearotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_linearotActionPerformed
        // TODO add your handling code here:
        columnavisualisarot=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_linearotActionPerformed

    private void jrbtn_temporadarotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_temporadarotActionPerformed
        // TODO add your handling code here:
        columnavisualisarot=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_temporadarotActionPerformed

    private void jtf_buscarenjtablerotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_buscarenjtablerotActionPerformed
        // TODO add your handling code here:
       this.find_textoenjtablerot(columnavisualisarot, 0, this.jtf_buscarenjtablerot.getText().toUpperCase().trim());
}//GEN-LAST:event_jtf_buscarenjtablerotActionPerformed
    private void jtb_catalogo_exisMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
}
    private void jtb_catalogo_exisKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtb_catalogo_exisKeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jtb_catalogo_exisKeyPressed

    private void jchbx_verexistenciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchbx_verexistenciasActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Actualizar?")==0) {
            if (controltiendas==0) {
                this.iniciar_modelo_tiendasexis();
            }
            this.verexistencias();
        }
}//GEN-LAST:event_jchbx_verexistenciasActionPerformed

    private void jtf_curpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_curpActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_curpActionPerformed

    private void jbtn_guardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_guardarActionPerformed
        // TODO add your handling code here:
                  if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0) {
                      this.guarda_proveedor();
                  }
    }//GEN-LAST:event_jbtn_guardarActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        this.jbtn_guardarActionPerformed(evt);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jbtn_imagenfull3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imagenfull3ActionPerformed
        // TODO add your handling code here:
        articulos_sie_editar_foto fasef=new articulos_sie_editar_foto(this.jtf_fotoidhisdis.getText());
        fasef.pack();
        RefineryUtilities.centerFrameOnScreen(fasef);

        fasef.setVisible(true);
}//GEN-LAST:event_jbtn_imagenfull3ActionPerformed

    private void jbtn_imagenfull4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imagenfull4ActionPerformed
        // TODO add your handling code here:
        articulos_sie_editar_foto fasef=new articulos_sie_editar_foto(this.jtf_fotoidrotarti.getText());
        fasef.pack();
        RefineryUtilities.centerFrameOnScreen(fasef);

        fasef.setVisible(true);
    }//GEN-LAST:event_jbtn_imagenfull4ActionPerformed

    private void jbtn_imagenfull5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imagenfull5ActionPerformed
        // TODO add your handling code here:
        articulos_sie_editar_foto fasef=new articulos_sie_editar_foto(this.jtf_fotoidmasven.getText());
        fasef.pack();
        RefineryUtilities.centerFrameOnScreen(fasef);

        fasef.setVisible(true);
    }//GEN-LAST:event_jbtn_imagenfull5ActionPerformed

    private void jbtn_imagenfull6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imagenfull6ActionPerformed
        // TODO add your handling code here:
        articulos_sie_editar_foto fasef=new articulos_sie_editar_foto(this.jtf_fotoidstocks.getText());
        fasef.pack();
        RefineryUtilities.centerFrameOnScreen(fasef);

        fasef.setVisible(true);
    }//GEN-LAST:event_jbtn_imagenfull6ActionPerformed

    private void jrbn_repguarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbn_repguarActionPerformed
        // TODO add your handling code here:
        opcioncons=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbn_repguarActionPerformed

    private void jrbn_repcontruyeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbn_repcontruyeActionPerformed
        // TODO add your handling code here:
        opcioncons=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbn_repcontruyeActionPerformed

    private void jcbx_tiendasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_tiendasActionPerformed
        // TODO add your handling code here:
      


        //this.jtfpruebados.setText(jtable_tiendas.getValueAt(indeceta, 0).toString());
}//GEN-LAST:event_jcbx_tiendasActionPerformed

    private void jdc_fechainicial1InputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jdc_fechainicial1InputMethodTextChanged
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechainicial1InputMethodTextChanged

    private void jdc_fechainicial1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jdc_fechainicial1KeyPressed
        // TODO add your handling code here:
}//GEN-LAST:event_jdc_fechainicial1KeyPressed

    private void jcbx_tiendas1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_tiendas1ActionPerformed
        // TODO add your handling code here:



        //this.jtfpruebados.setText(jtable_tiendas.getValueAt(indeceta, 0).toString());
}//GEN-LAST:event_jcbx_tiendas1ActionPerformed

    private void jbtn_generareporte1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generareporte1ActionPerformed
        // TODO add your handling code here:
        SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd");

        String pFechai = formato.format(this.jdc_fechainicial1.getDate());//fecha final de reporte
        String pFecha = formato.format(this.jdc_fechafinal1.getDate());//fecha final de reporte
        String idcli[]=this.jcbx_tiendas1.getSelectedItem().toString().split(":");
        if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0) {
            this.carga_datos_compras_xtienda(12,idcli[2] ,this.jtf_provid.getText(),idcli[0],pFechai,pFecha);
        }
}//GEN-LAST:event_jbtn_generareporte1ActionPerformed

    private void jtf_idprovnuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_idprovnuevoActionPerformed
        // TODO add your handling code here:
        String texto="select * from x1distribucion_terminados_proveedores_update(2,'"+this.jtf_provid.getText().toString().toUpperCase()+"','"+this.jtf_idprovnuevo.getText().toString().toUpperCase()+"','','','','','','','','','','','','','','','','','','','','','','','')";
       System.out.println(texto);

       String confirma="";
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                     confirma=rs.getString(1);
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (confirma.equals("1"))
              {
                JOptionPane.showMessageDialog(null,"Gracias datos Actualizados Correctamente", "Sistema Integral Proveedores",1);
              }
         else
              {
                JOptionPane.showMessageDialog(null,"Error Consulte con Su Administrador", "Sistema Integral Proveedores",1);
              }
        
}//GEN-LAST:event_jtf_idprovnuevoActionPerformed
  private void jtb_almacen_catalogoMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    private void jtb_comprascatalogoMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");


        int fila = jtb_comprascatalogo.getSelectedRow();
        String idfolio = jtb_comprascatalogo.getValueAt(fila, 1).toString();

        com_distri_compras_detalle fcdcd=new com_distri_compras_detalle(idfolio);
        fcdcd.pack();
        fcdcd.setVisible(true);
    }
private void dioclickexi(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jtb_catalogo_exis.getSelectedRow();
         String valor[] = jtb_catalogo_exis.getValueAt(fila, 1).toString().split(":");

        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        articulos_sie_editar fase=new articulos_sie_editar(valor[0]);
        fase.pack();
        fase.setVisible(true);
        //setVisible(false);
    }
 
private void contruir_grafica_costo()
    {
        //inicio a extraer los totales del dia sin incluir monedero es decir al reporte detalle corte
        //contruyo el grafico de lineas del cortes del dia detalle

         DefaultCategoryDataset datasetbarra = new DefaultCategoryDataset();
         String titulografico="",totaltiendatexto="",titulopartido[]=null;
         int totalfilasreporte=this.jtable_modelo_resumen.getRowCount()-2,i=0,ii=0;
         int numerotiendas=this.jtable_modelo_resumen.getColumnCount()-2;
         float totalve=0;
         for( ii=0;ii<numerotiendas;ii++)
            {
                System.out.println(totalfilasreporte);
                totalve=Float.valueOf(jtable_modelo_resumen.getValueAt(5, ii+1).toString().replace(",","").replace(".","").replace("<html><h3><b>","").replace("</b></h3></html>", ""));

                titulografico=jtable_modelo_resumen.getColumnName(ii+1).replace("<html><b>","").replace("</b></html>","");
                titulopartido=titulografico.split(":");
                if(totalve>0)
                    {
                        datasetbarra.addValue(totalve,ii+":"+titulopartido[1],"Tiendas");
                    }

         }
       //System.out.println("se crea nuevo:");
        graficacion_varios_barras gvbtempo = new graficacion_varios_barras("Sistema Integral: Estadisticas costos Proveedor",datasetbarra,"Resumen de inventarios Proveedor :"+this.jtf_idsubfamilia.getText(),"Tiendas");
        gvbtempo.pack();
        RefineryUtilities.centerFrameOnScreen(gvbtempo);
        gvbtempo.setVisible(true);
        //this.jif_graficaarticulos.getParent().add(gvbtempo);
     }

private void verfotosestereporte()
    {
     this.cambiartamanofilas();
     int numerofilas=this.jtable_modelo_articyestadis.getRowCount();
             for(int i = 0 ;i < numerofilas; i++)
                {
                      jtable_modelo_articyestadis.setValueAt("<html><head></head><body><p style=\"margin-top: 0\"><img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_articyestadis.getValueAt(i, 4).toString()+".JPG\" width=\"90\" height=\"60\" border=\"0\" alt=\"Foto\"></img></p></body></html>", i,14);
                      jt_articulosestadisticas.setRowHeight(i, 70);
                }

    }
private void quitarfotosestereporte()
    {
     int numerofilas=this.jtable_modelo_articyestadis.getRowCount();

             for(int i = 0 ;i < numerofilas; i++)
                {
                      jtable_modelo_articyestadis.setValueAt("", i,14);
                      jt_articulosestadisticas.setRowHeight(i, 15);
                }
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new com_distri_compras_proveedores_edita().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.JButton jButton1;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButtonrot;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_generareporte;
    private javax.swing.JButton jbtn_generareporte1;
    private javax.swing.JButton jbtn_guardar;
    private javax.swing.JButton jbtn_imagenfull3;
    private javax.swing.JButton jbtn_imagenfull4;
    private javax.swing.JButton jbtn_imagenfull5;
    private javax.swing.JButton jbtn_imagenfull6;
    private javax.swing.JCheckBox jcb_verfotos1;
    private javax.swing.JComboBox jcbx_clasificacion;
    private javax.swing.JComboBox jcbx_ctacontrol;
    private javax.swing.JComboBox jcbx_idstatus;
    private javax.swing.JComboBox jcbx_tiendas;
    private javax.swing.JComboBox jcbx_tiendas1;
    private javax.swing.JCheckBox jchbx_agregarsieuno;
    private javax.swing.JCheckBox jchbx_verexistencias;
    private javax.swing.JCheckBox jchk_graficadistribucion;
    private javax.swing.JCheckBox jckbx_veralmacen;
    private com.toedter.calendar.JDateChooser jdc_fechafinal;
    private com.toedter.calendar.JDateChooser jdc_fechafinal1;
    private com.toedter.calendar.JDateChooser jdc_fechainicial;
    private com.toedter.calendar.JDateChooser jdc_fechainicial1;
    private javax.swing.JEditorPane jep_articuloimagen;
    private javax.swing.JEditorPane jep_articuloimagen1;
    private javax.swing.JEditorPane jep_articuloimagen2;
    private javax.swing.JEditorPane jep_articuloimagen3;
    private javax.swing.JEditorPane jep_bitacora;
    private javax.swing.JEditorPane jep_observaciones;
    private javax.swing.JLabel jlb_resultado;
    private javax.swing.JLabel jlb_resultado1;
    private javax.swing.JLabel jlb_resultado2;
    private javax.swing.JLabel jlbl_cantidadregistros;
    private javax.swing.JLabel jlbl_cantidadregistros1;
    private javax.swing.JLabel jlbl_textobuscado;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_iraingresatexto;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JPanel jp_invxtienda;
    private javax.swing.JRadioButton jrbn_repcontruye;
    private javax.swing.JRadioButton jrbn_repguar;
    private javax.swing.JRadioButton jrbtn_columnaclave;
    private javax.swing.JRadioButton jrbtn_columnaclave1;
    private javax.swing.JRadioButton jrbtn_columnaclaverot;
    private javax.swing.JRadioButton jrbtn_item;
    private javax.swing.JRadioButton jrbtn_item1;
    private javax.swing.JRadioButton jrbtn_itemrot;
    private javax.swing.JRadioButton jrbtn_linea;
    private javax.swing.JRadioButton jrbtn_linea1;
    private javax.swing.JRadioButton jrbtn_linearot;
    private javax.swing.JRadioButton jrbtn_temporadarot;
    private javax.swing.JTable jt_articulosestadisticas;
    private javax.swing.JTable jt_comprasxmes;
    private javax.swing.JTable jt_invextie;
    private javax.swing.JTable jt_ventasmensuales;
    private javax.swing.JTable jtb_almacen_catalogo;
    private javax.swing.JTable jtb_articmasven;
    private javax.swing.JTable jtb_catalogo_exis;
    private javax.swing.JTable jtb_comprascatalogo;
    private javax.swing.JTable jtb_comxfam_detalleprov_artis;
    private javax.swing.JTable jtbl_distribucion;
    private javax.swing.JTable jtbl_estadisticasarticulo;
    private javax.swing.JTable jtbl_estadisticasarticulo1;
    private javax.swing.JTextField jtf_acumuladocomp;
    private javax.swing.JTextField jtf_buscarenjtable;
    private javax.swing.JTextField jtf_buscarenjtableamv;
    private javax.swing.JTextField jtf_buscarenjtablerot;
    private javax.swing.JTextField jtf_curp;
    private javax.swing.JTextField jtf_diascredito;
    private javax.swing.JTextField jtf_domcalle;
    private javax.swing.JTextField jtf_domcod;
    private javax.swing.JTextField jtf_domcolonia;
    private javax.swing.JTextField jtf_dompobla;
    private javax.swing.JTextField jtf_domtelefono;
    private javax.swing.JTextField jtf_email;
    private javax.swing.JTextField jtf_fax;
    private javax.swing.JTextField jtf_fotoidhisdis;
    private javax.swing.JTextField jtf_fotoidmasven;
    private javax.swing.JTextField jtf_fotoidrotarti;
    private javax.swing.JTextField jtf_fotoidstocks;
    private javax.swing.JTextField jtf_fotoidstocks1;
    private javax.swing.JTextField jtf_fotoidstocks2;
    private javax.swing.JTextField jtf_fultcompra;
    private javax.swing.JTextField jtf_fultpago;
    private javax.swing.JTextField jtf_idprovnuevo;
    private javax.swing.JTextField jtf_idsubfamilia;
    private javax.swing.JTextField jtf_inicialarticulos;
    private javax.swing.JTextField jtf_limitecredito;
    private javax.swing.JTextField jtf_porcendescuento;
    private javax.swing.JTextField jtf_provid;
    private javax.swing.JTextField jtf_provnombre;
    private javax.swing.JTextField jtf_rfc;
    private javax.swing.JTextField jtf_termiarti;
    // End of variables declaration//GEN-END:variables

}
